mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Merge remote-tracking branch 'upstream/develop' into 10.0_linkedin
This commit is contained in:
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
htdocs/takepos @andreubisquerra
|
||||||
36
.github/CONTRIBUTING.md
vendored
36
.github/CONTRIBUTING.md
vendored
@@ -38,7 +38,7 @@ We officially support versions N, N − 1 and N − 2 for N the latest version a
|
|||||||
Choose your base branch accordingly.
|
Choose your base branch accordingly.
|
||||||
|
|
||||||
### General rules
|
### General rules
|
||||||
Please don't edit the ChangeLog file. File will be generated from your commit messages during release process by the project manager.
|
Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
|
||||||
|
|
||||||
### <a name="commits"></a>Commits
|
### <a name="commits"></a>Commits
|
||||||
Use clear commit messages with the following structure:
|
Use clear commit messages with the following structure:
|
||||||
@@ -56,13 +56,15 @@ You can add it to your git configuration using:
|
|||||||
git config --local commit.template .gitmessage
|
git config --local commit.template .gitmessage
|
||||||
```
|
```
|
||||||
|
|
||||||
|
where
|
||||||
|
|
||||||
#### Keyword
|
#### Keyword
|
||||||
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
|
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
|
||||||
|
|
||||||
The keyword can be ommitted if your commit does not fit in any of the following categories:
|
The keyword can be ommitted if your commit does not fit in any of the following categories:
|
||||||
- Fix: for a bug fix
|
- Fix/FIX: for a bug fix
|
||||||
- Close: for closing a referenced feature request
|
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
||||||
- New: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
- Close/CLOSE: for closing a referenced feature request
|
||||||
|
|
||||||
#### Issuenum
|
#### Issuenum
|
||||||
If your commit fixes a referenced bug or feature request.
|
If your commit fixes a referenced bug or feature request.
|
||||||
@@ -85,14 +87,14 @@ This section can span multiple lines.
|
|||||||
|
|
||||||
Try to keep lines under 120 characters.
|
Try to keep lines under 120 characters.
|
||||||
|
|
||||||
#### Samples
|
#### Examples
|
||||||
<pre>
|
<pre>
|
||||||
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
||||||
or
|
or
|
||||||
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
|
|
||||||
or
|
|
||||||
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
|
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
|
||||||
or
|
or
|
||||||
|
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
|
||||||
|
or
|
||||||
Short description (when the commit is not introducing feature nor closing a bug)
|
Short description (when the commit is not introducing feature nor closing a bug)
|
||||||
|
|
||||||
Long description (Can span accross multiple lines).
|
Long description (Can span accross multiple lines).
|
||||||
@@ -104,13 +106,22 @@ When submitting a pull request, use same rule as [Commits](#commits) for the mes
|
|||||||
If your pull request only contains one commit, GitHub will be smart enough to fill it for you.
|
If your pull request only contains one commit, GitHub will be smart enough to fill it for you.
|
||||||
Otherwise, please be a bit verbose about what you're providing.
|
Otherwise, please be a bit verbose about what you're providing.
|
||||||
|
|
||||||
Your Pull Request must pass the Continuous Integration checks.
|
Your Pull Request (PR) must pass the Continuous Integration checks.
|
||||||
Also, some code changes need a prior approbation:
|
Also, some code changes need a prior approbation:
|
||||||
|
|
||||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted.
|
* if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted.
|
||||||
|
|
||||||
* if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest.
|
* if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest.
|
||||||
|
|
||||||
|
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow
|
||||||
|
every developer discuss about the PR.
|
||||||
|
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later.
|
||||||
|
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR.
|
||||||
|
By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
|
||||||
|
Around 95% of submitted PR are reviewed and tagged. Even if this is one of the most important ratio in Open Source world, don't expect the core team
|
||||||
|
to reach the 100%. With the increasing popularity of Dolibarr, this ratio will probably decrease in future.
|
||||||
|
|
||||||
|
|
||||||
### Resources
|
### Resources
|
||||||
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||||
|
|
||||||
@@ -120,9 +131,12 @@ The source language (en_US) is maintained in the repository. See the [Code](#cod
|
|||||||
|
|
||||||
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
|
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
|
||||||
|
|
||||||
Join an existing translation team or create your own and translate into the interface.
|
Translations done on transifex are available in the next major release.
|
||||||
|
|
||||||
|
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
|
||||||
|
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
|
||||||
|
to retreive all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
|
||||||
|
|
||||||
Your translations will be available in the next major release.
|
|
||||||
|
|
||||||
### Resources
|
### Resources
|
||||||
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
|
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
|
||||||
@@ -131,5 +145,5 @@ Documentation
|
|||||||
-------------
|
-------------
|
||||||
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
|
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
|
||||||
|
|
||||||
*Note*: to help prevent spam, you need to create an account before being able to edit.
|
*Note*: to help prevent spam, you need to create an account before being able to edit. Everybody is welcome to contribute to its content.
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ matrix:
|
|||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly
|
||||||
- php: '7.3'
|
|
||||||
# We exclude some combinations not usefull to save Travis CPU
|
# We exclude some combinations not usefull to save Travis CPU
|
||||||
exclude:
|
exclude:
|
||||||
- php: '5.5'
|
- php: '5.5'
|
||||||
@@ -71,6 +70,8 @@ matrix:
|
|||||||
env: DB=mariadb
|
env: DB=mariadb
|
||||||
- php: '7.1'
|
- php: '7.1'
|
||||||
env: DB=mariadb
|
env: DB=mariadb
|
||||||
|
- php: '7.2'
|
||||||
|
env: DB=mariadb
|
||||||
- php: '5.5'
|
- php: '5.5'
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- php: '5.6'
|
- php: '5.6'
|
||||||
@@ -79,7 +80,7 @@ matrix:
|
|||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- php: '7.1'
|
- php: '7.1'
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- php: '7.3'
|
- php: '7.2'
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
- php: nightly
|
- php: nightly
|
||||||
env: DB=postgresql
|
env: DB=postgresql
|
||||||
|
|||||||
@@ -361,12 +361,12 @@ if ($nboftargetok) {
|
|||||||
}
|
}
|
||||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||||
{
|
{
|
||||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||||
}
|
}
|
||||||
else # For a maintenance release
|
else # For a maintenance release
|
||||||
{
|
{
|
||||||
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||||
|
|
||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Wrapper to include main into htdocs
|
|
||||||
include_once '/home/ldestailleur/git/dolibarr_3.8/htdocs/main.inc.php';
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Wrapper to include master into htdocs
|
|
||||||
include_once '/home/ldestailleur/git/dolibarr_3.8/htdocs/master.inc.php';
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 360 KiB |
@@ -9,8 +9,8 @@
|
|||||||
# Regis Houssin - regis.houssin@inodbox.com
|
# Regis Houssin - regis.houssin@inodbox.com
|
||||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||||
#------------------------------------------------------
|
#------------------------------------------------------
|
||||||
# Usage: initdemo.sh
|
# Usage: initdemo.sh confirm
|
||||||
# usage: initdemo.sh mysqldump_dolibarr_x.x.x.sql database port login pass
|
# usage: initdemo.sh confirm mysqldump_dolibarr_x.x.x.sql database port login pass
|
||||||
#------------------------------------------------------
|
#------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@@ -31,11 +31,20 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# ----------------------------- command line params
|
# ----------------------------- command line params
|
||||||
dumpfile=$1;
|
confirm=$1;
|
||||||
base=$2;
|
dumpfile=$2;
|
||||||
port=$3;
|
base=$3;
|
||||||
admin=$4;
|
port=$4;
|
||||||
passwd=$5;
|
admin=$5;
|
||||||
|
passwd=$6;
|
||||||
|
|
||||||
|
# ----------------------------- check params
|
||||||
|
if [ "x$confirm" != "xconfirm" ]
|
||||||
|
then
|
||||||
|
echo "----- $0 -----"
|
||||||
|
echo "Usage: initdemo.sh confirm [mysqldump_dolibarr_x.x.x.sql database port login pass]"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------- if no params on command line
|
# ----------------------------- if no params on command line
|
||||||
@@ -133,10 +142,13 @@ then
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------- confirmation
|
# ---------------------------- confirmation
|
||||||
DIALOG=${DIALOG=dialog}
|
DIALOG=${DIALOG=dialog}
|
||||||
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
$DIALOG --title "Init Dolibarr with demo values" --clear \
|
||||||
--yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : '$passwd'" 15 55
|
--yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Document dir : '$documentdir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : '$passwd'" 15 55
|
||||||
|
|
||||||
case $? in
|
case $? in
|
||||||
0) echo "Ok, start process...";;
|
0) echo "Ok, start process...";;
|
||||||
@@ -165,15 +177,44 @@ export res=$?
|
|||||||
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
|
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
|
||||||
if [ "x$documentdir" != "x" ]
|
if [ "x$documentdir" != "x" ]
|
||||||
then
|
then
|
||||||
|
$DIALOG --title "Reset document directory tpp" --clear \
|
||||||
|
--inputbox "Delete and recreate document directory $documentdir/:" 16 55 n 2> $fichtemp
|
||||||
|
|
||||||
|
valret=$?
|
||||||
|
|
||||||
|
case $valret in
|
||||||
|
0)
|
||||||
|
rep=`cat $fichtemp`;;
|
||||||
|
1)
|
||||||
|
exit;;
|
||||||
|
255)
|
||||||
|
exit;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "rep=$rep"
|
||||||
|
if [ "x$rep" = "xy" ]; then
|
||||||
|
echo rm -fr "$documentdir/*"
|
||||||
|
rm -fr $documentdir/*
|
||||||
|
fi
|
||||||
|
|
||||||
echo cp -pr $mydir/documents_demo/* "$documentdir/"
|
echo cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||||
cp -pr $mydir/documents_demo/* "$documentdir/"
|
cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||||
|
|
||||||
|
mkdir "$documentdir/doctemplates/" 2>/dev/null
|
||||||
echo cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
echo cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
||||||
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
||||||
mkdir -p "$documentdir/ecm/Administrative documents"
|
|
||||||
mkdir -p "$documentdir/ecm/Images"
|
echo cp -pr $mydir/../../htdocs/install/medias/* "$documentdir/medias/image/"
|
||||||
|
cp -pr $mydir/../../htdocs/install/medias/* "$documentdir/medias/image/"
|
||||||
|
|
||||||
|
mkdir -p "$documentdir/ecm/Administrative documents" 2>/dev/null
|
||||||
|
mkdir -p "$documentdir/ecm/Images" 2>/dev/null
|
||||||
rm -f "$documentdir/doctemplates/"*/index.html
|
rm -f "$documentdir/doctemplates/"*/index.html
|
||||||
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||||
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||||
|
|
||||||
|
chmod -R u+w "$documentdir/"
|
||||||
|
chown -R www-data "$documentdir/"
|
||||||
else
|
else
|
||||||
echo Detection of documents directory from $mydir failed so demo files were not copied.
|
echo Detection of documents directory from $mydir failed so demo files were not copied.
|
||||||
fi
|
fi
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -48,7 +48,7 @@ if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.i
|
|||||||
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
|
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
|
||||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||||
if (! $res) die ("Failed to include master.inc.php file\n");
|
if (! $res) die("Failed to include master.inc.php file\n");
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.i
|
|||||||
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
|
if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php";
|
||||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||||
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only
|
||||||
if (! $res) die ("Failed to include master.inc.php file\n");
|
if (! $res) die("Failed to include master.inc.php file\n");
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,10 @@
|
|||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterEquals">
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"> <!-- We don't want this rule, we want to be able to align params on several similare functions on different lines -->
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
@@ -426,4 +429,5 @@
|
|||||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||||
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
|
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
|
||||||
<rule ref="PSR2.Files.EndFileNewline.NoneFound" />
|
<rule ref="PSR2.Files.EndFileNewline.NoneFound" />
|
||||||
|
<rule ref="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket" />
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ fi
|
|||||||
FROM=$1-01-01
|
FROM=$1-01-01
|
||||||
TO=$1-12-31
|
TO=$1-12-31
|
||||||
|
|
||||||
|
echo "Number of contributors for the year"
|
||||||
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
|
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
|
||||||
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
|
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
|
||||||
|
|
||||||
|
|
||||||
|
echo "Number of commit for the year"
|
||||||
|
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}' | grep "Year: $1"
|
||||||
|
|||||||
@@ -173,17 +173,16 @@ while ($obj = $db->fetch_object($resql)) {
|
|||||||
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
|
|
||||||
dol_syslog ("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
|
dol_syslog("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $resql)
|
if (! $resql) {
|
||||||
{
|
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
dol_syslog ("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
|
dol_syslog("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
|
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
|
||||||
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -661,13 +661,11 @@ class AccountancyCategory // extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Function to know all category from accounting account
|
* Function to know all category from accounting account
|
||||||
*
|
*
|
||||||
* @return array Result in table
|
* @return array|integer Result in table (array), -1 if KO
|
||||||
*/
|
*/
|
||||||
public function getCatsCpts()
|
public function getCatsCpts()
|
||||||
{
|
{
|
||||||
global $mysoc,$conf;
|
global $mysoc, $conf;
|
||||||
|
|
||||||
$sql = "";
|
|
||||||
|
|
||||||
if (empty($mysoc->country_id)) {
|
if (empty($mysoc->country_id)) {
|
||||||
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
||||||
@@ -720,7 +718,7 @@ class AccountancyCategory // extends CommonObject
|
|||||||
* @param int|array $cpt Accounting account or array of accounting account
|
* @param int|array $cpt Accounting account or array of accounting account
|
||||||
* @param string $date_start Date start
|
* @param string $date_start Date start
|
||||||
* @param string $date_end Date end
|
* @param string $date_end Date end
|
||||||
* @param int $sens Sens of the account: 0: credit - debit, 1: debit - credit
|
* @param int $sens Sens of the account: 0: credit - debit (use this by default), 1: debit - credit
|
||||||
* @param string $thirdparty_code Thirdparty code
|
* @param string $thirdparty_code Thirdparty code
|
||||||
* @param int $month Specifig month - Can be empty
|
* @param int $month Specifig month - Can be empty
|
||||||
* @param int $year Specifig year - Can be empty
|
* @param int $year Specifig year - Can be empty
|
||||||
@@ -805,7 +803,7 @@ class AccountancyCategory // extends CommonObject
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
|
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type, c.sens";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
|
||||||
$sql .= " WHERE c.active = 1";
|
$sql .= " WHERE c.active = 1";
|
||||||
$sql .= " AND c.entity = " . $conf->entity;
|
$sql .= " AND c.entity = " . $conf->entity;
|
||||||
@@ -829,7 +827,8 @@ class AccountancyCategory // extends CommonObject
|
|||||||
'label' => $obj->label,
|
'label' => $obj->label,
|
||||||
'formula' => $obj->formula,
|
'formula' => $obj->formula,
|
||||||
'position' => $obj->position,
|
'position' => $obj->position,
|
||||||
'category_type' => $obj->category_type
|
'category_type' => $obj->category_type,
|
||||||
|
'bc' => $obj->sens
|
||||||
);
|
);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ class AccountingJournal extends CommonObject
|
|||||||
if (! empty($this->code))
|
if (! empty($this->code))
|
||||||
$label .= '<br><b>'.$langs->trans('Code') . ':</b> ' . $this->code;
|
$label .= '<br><b>'.$langs->trans('Code') . ':</b> ' . $this->code;
|
||||||
if (! empty($this->label))
|
if (! empty($this->label))
|
||||||
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $this->label;
|
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $langs->transnoentities($this->label);
|
||||||
if ($moretitle) $label.=' - '.$moretitle;
|
if ($moretitle) $label.=' - '.$moretitle;
|
||||||
|
|
||||||
$linkclose='';
|
$linkclose='';
|
||||||
@@ -254,7 +254,7 @@ class AccountingJournal extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$label_link = $this->code;
|
$label_link = $this->code;
|
||||||
if ($withlabel) $label_link .= ' - ' . $this->label;
|
if ($withlabel) $label_link .= ' - ' . $langs->transnoentities($this->label);
|
||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
|
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ if ($result) {
|
|||||||
if ($objp->country_sell == '1') {
|
if ($objp->country_sell == '1') {
|
||||||
$objp->code_sell_p = $objp->code_sell;
|
$objp->code_sell_p = $objp->code_sell;
|
||||||
$objp->aarowid_suggest = $objp->aarowid;
|
$objp->aarowid_suggest = $objp->aarowid;
|
||||||
} elseif ($isinEEC == true) {
|
} elseif ($isinEEC === true) {
|
||||||
$objp->code_sell_p = $objp->code_sell_intra;
|
$objp->code_sell_p = $objp->code_sell_intra;
|
||||||
$objp->aarowid_suggest = $objp->aarowid_intra;
|
$objp->aarowid_suggest = $objp->aarowid_intra;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2016-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -33,6 +33,9 @@ $langs->loadLangs(array("compta","bills","other","accountancy","loans","banks","
|
|||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
|
||||||
|
$hookmanager->initHooks(array('accountancyindex'));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@@ -52,10 +55,10 @@ $step = 0;
|
|||||||
|
|
||||||
if ($conf->accounting->enabled)
|
if ($conf->accounting->enabled)
|
||||||
{
|
{
|
||||||
print $langs->trans("AccountancyAreaDescIntro")."<br>\n";
|
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
|
||||||
print "<br>\n";print "<br>\n";
|
print "<br>\n";print "<br>\n";
|
||||||
|
|
||||||
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."<br>\n";
|
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
|
||||||
print '<hr>';
|
print '<hr>';
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -633,12 +633,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["refsologest"] . '"' . $sep;
|
print '"' . $val["refsologest"] . '"' . $sep;
|
||||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 32)). '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)). '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
|
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
|
||||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
|
||||||
print '"' . $journal . '"' ;
|
print '"' . $journal . '"' ;
|
||||||
@@ -654,12 +654,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["refsologest"] . '"' . $sep;
|
print '"' . $val["refsologest"] . '"' . $sep;
|
||||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '""' . $sep;
|
print '""' . $sep;
|
||||||
print '"' . utf8_decode (dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
|
||||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
|
||||||
print '"' . $journal . '"' ;
|
print '"' . $journal . '"' ;
|
||||||
@@ -679,7 +679,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["refsologest"] . '"' . $sep;
|
print '"' . $val["refsologest"] . '"' . $sep;
|
||||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '""' . $sep;
|
print '""' . $sep;
|
||||||
@@ -700,12 +700,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["refsologest"] . '"' . $sep;
|
print '"' . $val["refsologest"] . '"' . $sep;
|
||||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 32)). '"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)). '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
|
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
|
||||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep;
|
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep;
|
||||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
|
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
|
||||||
print '"' . $journal . '"' ;
|
print '"' . $journal . '"' ;
|
||||||
|
|||||||
@@ -424,10 +424,10 @@ foreach ($AdherentType as $key => $adhtype)
|
|||||||
}
|
}
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td class="liste_total">'.$langs->trans("Total").'</td>';
|
print '<td class="liste_total">'.$langs->trans("Total").'</td>';
|
||||||
print '<td class="liste_total" class="right">'.$SommeA.' '.$staticmember->LibStatut(-1, $adhtype->subscription, 0, 3).'</td>';
|
print '<td class="liste_total right">'.$SommeA.' '.$staticmember->LibStatut(-1, $adhtype->subscription, 0, 3).'</td>';
|
||||||
print '<td class="liste_total" class="right">'.$SommeB.' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).'</td>';
|
print '<td class="liste_total right">'.$SommeB.' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).'</td>';
|
||||||
print '<td class="liste_total" class="right">'.$SommeC.' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).'</td>';
|
print '<td class="liste_total right">'.$SommeC.' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).'</td>';
|
||||||
print '<td class="liste_total" class="right">'.$SommeD.' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).'</td>';
|
print '<td class="liste_total right">'.$SommeD.' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|||||||
@@ -84,11 +84,11 @@ $arrayfields=array(
|
|||||||
'd.bank'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>1, 'enabled'=>(! empty($conf->banque->enabled))),
|
'd.bank'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>1, 'enabled'=>(! empty($conf->banque->enabled))),
|
||||||
/*'d.note_public'=>array('label'=>$langs->trans("NotePublic"), 'checked'=>0),
|
/*'d.note_public'=>array('label'=>$langs->trans("NotePublic"), 'checked'=>0),
|
||||||
'd.note_private'=>array('label'=>$langs->trans("NotePrivate"), 'checked'=>0),*/
|
'd.note_private'=>array('label'=>$langs->trans("NotePrivate"), 'checked'=>0),*/
|
||||||
'd.datedebut'=>array('label'=>$langs->trans("DateSubscription"), 'checked'=>1, 'position'=>100),
|
'c.dateadh'=>array('label'=>$langs->trans("DateSubscription"), 'checked'=>1, 'position'=>100),
|
||||||
'd.datefin'=>array('label'=>$langs->trans("EndSubscription"), 'checked'=>1, 'position'=>101),
|
'c.datef'=>array('label'=>$langs->trans("EndSubscription"), 'checked'=>1, 'position'=>101),
|
||||||
'd.amount'=>array('label'=>$langs->trans("Amount"), 'checked'=>1, 'position'=>102),
|
'd.amount'=>array('label'=>$langs->trans("Amount"), 'checked'=>1, 'position'=>102),
|
||||||
'd.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||||
'd.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||||
// 'd.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000)
|
// 'd.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -343,12 +343,12 @@ if (! empty($arrayfields['d.bank']['checked']))
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['d.date_debut']['checked']))
|
if (! empty($arrayfields['c.dateadh']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['d.date_fin']['checked']))
|
if (! empty($arrayfields['c.datef']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
}
|
}
|
||||||
@@ -367,13 +367,13 @@ $parameters=array('arrayfields'=>$arrayfields);
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Date creation
|
// Date creation
|
||||||
if (! empty($arrayfields['d.datec']['checked']))
|
if (! empty($arrayfields['c.datec']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Date modification
|
// Date modification
|
||||||
if (! empty($arrayfields['d.tms']['checked']))
|
if (! empty($arrayfields['c.tms']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -417,11 +417,11 @@ if (! empty($arrayfields['d.bank']['checked']))
|
|||||||
{
|
{
|
||||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "b.fk_account", $pram, "", "", $sortfield, $sortorder);
|
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "b.fk_account", $pram, "", "", $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['d.date_debut']['checked']))
|
if (! empty($arrayfields['c.dateadh']['checked']))
|
||||||
{
|
{
|
||||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['d.date_fin']['checked']))
|
if (! empty($arrayfields['c.datef']['checked']))
|
||||||
{
|
{
|
||||||
print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "c.datef", $param, "", 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "c.datef", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
@@ -436,9 +436,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
|||||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['d.datec']['checked'])) print_liste_field_titre($arrayfields['d.datec']['label'], $_SERVER["PHP_SELF"], "d.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['d.tms']['checked'])) print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -527,13 +527,13 @@ while ($i < min($num, $limit))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
if (! empty($arrayfields['d.date_start']['checked']))
|
if (! empty($arrayfields['c.dateadh']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dateadh), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->dateadh), 'day')."</td>\n";
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
// Date end
|
// Date end
|
||||||
if (! empty($arrayfields['d.date_end']['checked']))
|
if (! empty($arrayfields['c.datef']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datef), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->datef), 'day')."</td>\n";
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
@@ -553,7 +553,7 @@ while ($i < min($num, $limit))
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Date creation
|
// Date creation
|
||||||
if (! empty($arrayfields['d.datec']['checked']))
|
if (! empty($arrayfields['c.datec']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center" class="nowrap">';
|
print '<td align="center" class="nowrap">';
|
||||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||||
@@ -561,7 +561,7 @@ while ($i < min($num, $limit))
|
|||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
// Date modification
|
// Date modification
|
||||||
if (! empty($arrayfields['d.tms']['checked']))
|
if (! empty($arrayfields['c.tms']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center" class="nowrap">';
|
print '<td align="center" class="nowrap">';
|
||||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||||
|
|||||||
@@ -151,14 +151,14 @@ print "<table class=\"noborder\" width=\"100%\">";
|
|||||||
|
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<td>'.$langs->trans("Parameter")."</td>";
|
print '<td>'.$langs->trans("Parameter")."</td>";
|
||||||
print '<td align="center">'.$langs->trans("Value")."</td>";
|
print '<td class="center">'.$langs->trans("Value")."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Show external agenda
|
// Show external agenda
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print "<td>".$langs->trans("ExtSitesEnableThisTool")."</td>";
|
print "<td>".$langs->trans("ExtSitesEnableThisTool")."</td>";
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print ajax_constantonoff('AGENDA_DISABLE_EXT', array('enabled'=>array(0=>'.hideifnotset')), null, 1);
|
print ajax_constantonoff('AGENDA_DISABLE_EXT', array('enabled'=>array(0=>'.hideifnotset')), null, 1);
|
||||||
@@ -181,7 +181,7 @@ print "</tr>";
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print "<td>".$langs->trans("ExtSitesNbOfAgenda")."</td>";
|
print "<td>".$langs->trans("ExtSitesNbOfAgenda")."</td>";
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print '<input class="flat hideifnotset" type="text" size="2" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="'.$conf->global->AGENDA_EXT_NB.'">';
|
print '<input class="flat hideifnotset" type="text" size="2" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="'.$conf->global->AGENDA_EXT_NB.'">';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|||||||
@@ -225,10 +225,10 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
print '<tr class="liste_titre">'."\n";
|
print '<tr class="liste_titre">'."\n";
|
||||||
print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
|
print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
|
||||||
print '<td>'.$langs->trans("Description").'</td>'."\n";
|
print '<td>'.$langs->trans("Description").'</td>'."\n";
|
||||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'."\n";
|
print '<td class="center" width="60">'.$langs->trans("Status").'</td>'."\n";
|
||||||
print '<td align="center" width="60">'.$langs->trans("Default").'</td>'."\n";
|
print '<td class="center" width="60">'.$langs->trans("Default").'</td>'."\n";
|
||||||
print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
|
print '<td class="center" width="40">'.$langs->trans("ShortInfo").'</td>';
|
||||||
print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
|
print '<td class="center" width="40">'.$langs->trans("Preview").'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@@ -269,7 +269,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<td align="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name")
|
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name")
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
||||||
@@ -284,13 +284,13 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default
|
// Default
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name")
|
if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name")
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
@@ -307,10 +307,10 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
|||||||
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ print '<input type="hidden" name="action" value="set">';
|
|||||||
print '<table class="noborder allwidth">'."\n";
|
print '<table class="noborder allwidth">'."\n";
|
||||||
print '<tr class="liste_titre">'."\n";
|
print '<tr class="liste_titre">'."\n";
|
||||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
|
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
@@ -338,7 +338,7 @@ print '</tr>'."\n";
|
|||||||
|
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
|
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
//print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
|
//print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
|
||||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
@@ -355,7 +355,7 @@ print '</td></tr>'."\n";
|
|||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
$htmltext=$langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup"));
|
$htmltext=$langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup"));
|
||||||
print '<td>'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n";
|
print '<td>'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
$tmplist=array(''=>' ', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));
|
$tmplist=array(''=>' ', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));
|
||||||
print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW);
|
print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW);
|
||||||
@@ -367,8 +367,8 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
|||||||
print '<!-- AGENDA_USE_EVENT_TYPE_DEFAULT -->';
|
print '<!-- AGENDA_USE_EVENT_TYPE_DEFAULT -->';
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
|
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right" class="nowrap">'."\n";
|
print '<td class="right nowrap">'."\n";
|
||||||
$formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1);
|
$formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@@ -376,8 +376,8 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
|||||||
// AGENDA_DEFAULT_FILTER_TYPE
|
// AGENDA_DEFAULT_FILTER_TYPE
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n";
|
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right" class="nowrap">'."\n";
|
print '<td class="right nowrap">'."\n";
|
||||||
$formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1);
|
$formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
@@ -385,7 +385,7 @@ print '</td></tr>'."\n";
|
|||||||
// TODO Remove to use the default generic feature
|
// TODO Remove to use the default generic feature
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n";
|
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
$formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
|
$formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|||||||
@@ -185,17 +185,17 @@ print '<input type="hidden" name="action" value="set">';
|
|||||||
print '<table class="noborder allwidth">'."\n";
|
print '<table class="noborder allwidth">'."\n";
|
||||||
print '<tr class="liste_titre">'."\n";
|
print '<tr class="liste_titre">'."\n";
|
||||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
|
print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
|
||||||
// AGENDA REMINDER EMAIL
|
// AGENDA REMINDER EMAIL
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
if ($conf->global->MAIN_FEATURES_LEVEL == 2)
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).'</td>'."\n";
|
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
|
|
||||||
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
if (empty($conf->global->AGENDA_REMINDER_EMAIL)) {
|
||||||
@@ -208,11 +208,11 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AGENDA REMINDER BROWSER
|
// AGENDA REMINDER BROWSER
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
if ($conf->global->MAIN_FEATURES_LEVEL == 2)
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
|
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
|
|
||||||
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
if (empty($conf->global->AGENDA_REMINDER_BROWSER)) {
|
||||||
@@ -224,7 +224,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
|||||||
|
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').'</td>'."\n";
|
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').'</td>'."\n";
|
||||||
print '<td align="center"> </td>'."\n";
|
print '<td class="center"> </td>'."\n";
|
||||||
print '<td class="right">'."\n";
|
print '<td class="right">'."\n";
|
||||||
|
|
||||||
if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
|
if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) {
|
||||||
|
|||||||
@@ -183,8 +183,8 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td width="140">' . $langs->trans("Name") . '</td>';
|
print '<td width="140">' . $langs->trans("Name") . '</td>';
|
||||||
print '<td>' . $langs->trans("Description") . '</td>';
|
print '<td>' . $langs->trans("Description") . '</td>';
|
||||||
print '<td>' . $langs->trans("Example") . '</td>';
|
print '<td>' . $langs->trans("Example") . '</td>';
|
||||||
print '<td align="center">' . $langs->trans("Status") . '</td>';
|
print '<td class="center">' . $langs->trans("Status") . '</td>';
|
||||||
print '<td align="center" width="60"> </td>';
|
print '<td class="center" width="60"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$bankorder[0][0] = $langs->trans("BankOrderGlobal");
|
$bankorder[0][0] = $langs->trans("BankOrderGlobal");
|
||||||
@@ -213,12 +213,12 @@ while ($i < $nbofbank) {
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
if ($conf->global->BANK_SHOW_ORDER_OPTION == $i) {
|
if ($conf->global->BANK_SHOW_ORDER_OPTION == $i) {
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print img_picto($langs->trans("Activated"), 'on');
|
print img_picto($langs->trans("Activated"), 'on');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<td align="center"><a href="' . $_SERVER['PHP_SELF'] . '?action=setbankorder&value=' . $i . '">';
|
print '<td class="center"><a href="' . $_SERVER['PHP_SELF'] . '?action=setbankorder&value=' . $i . '">';
|
||||||
print img_picto($langs->trans("Disabled"), 'off');
|
print img_picto($langs->trans("Disabled"), 'off');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
@@ -263,10 +263,10 @@ print "<table class=\"noborder\" width=\"100%\">\n";
|
|||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
print '<td>' . $langs->trans("Name") . '</td>';
|
print '<td>' . $langs->trans("Name") . '</td>';
|
||||||
print '<td>' . $langs->trans("Description") . '</td>';
|
print '<td>' . $langs->trans("Description") . '</td>';
|
||||||
print '<td align="center" width="60">' . $langs->trans("Status") . "</td>\n";
|
print '<td class="center" width="60">' . $langs->trans("Status") . "</td>\n";
|
||||||
print '<td align="center" width="60">' . $langs->trans("Default") . "</td>\n";
|
print '<td class="center" width="60">' . $langs->trans("Default") . "</td>\n";
|
||||||
print '<td align="center" width="38">' . $langs->trans("ShortInfo") . '</td>';
|
print '<td class="center" width="38">' . $langs->trans("ShortInfo") . '</td>';
|
||||||
print '<td align="center" width="38">' . $langs->trans("Preview") . '</td>';
|
print '<td class="center" width="38">' . $langs->trans("Preview") . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@@ -315,7 +315,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
|
|
||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def)) {
|
if (in_array($name, $def)) {
|
||||||
print '<td align="center">' . "\n";
|
print '<td class="center">' . "\n";
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&value=' . $name . '">';
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&value=' . $name . '">';
|
||||||
print img_picto($langs->trans("Enabled"),
|
print img_picto($langs->trans("Enabled"),
|
||||||
'switch_on');
|
'switch_on');
|
||||||
@@ -323,14 +323,14 @@ foreach ($dirmodels as $reldir) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<td align="center">' . "\n";
|
print '<td class="center">' . "\n";
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&scan_dir=' . $module->scandir . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"),
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&scan_dir=' . $module->scandir . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"),
|
||||||
'switch_off') . '</a>';
|
'switch_off') . '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default
|
// Default
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->global->BANKADDON_PDF == $name) {
|
if ($conf->global->BANKADDON_PDF == $name) {
|
||||||
print img_picto($langs->trans("Default"),
|
print img_picto($langs->trans("Default"),
|
||||||
'on');
|
'on');
|
||||||
@@ -358,13 +358,13 @@ foreach ($dirmodels as $reldir) {
|
|||||||
// $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
// $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
||||||
//$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
|
//$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $form->textwithpicto('', $htmltooltip, 1,
|
print $form->textwithpicto('', $htmltooltip, 1,
|
||||||
0);
|
0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Preview
|
// Preview
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($module->type == 'pdf') {
|
if ($module->type == 'pdf') {
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"),
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"),
|
||||||
'bill') . '</a>';
|
'bill') . '</a>';
|
||||||
@@ -404,7 +404,7 @@ print "<table class=\"noborder\" width=\"100%\">\n";
|
|||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
print '<td>' . $langs->trans("Name") . '</td>';
|
print '<td>' . $langs->trans("Name") . '</td>';
|
||||||
print '<td>' . $langs->trans("Description") . '</td>';
|
print '<td>' . $langs->trans("Description") . '</td>';
|
||||||
print '<td align="center" width="60">' . $langs->trans("Status") . "</td>\n";
|
print '<td class="center" width="60">' . $langs->trans("Status") . "</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td width="100">';
|
print '<tr class="oddeven"><td width="100">';
|
||||||
@@ -414,7 +414,7 @@ print $langs->trans('AutoReportLastAccountStatement');
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
// Active
|
// Active
|
||||||
if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
|
if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
|
||||||
print '<td align="center">' . "\n";
|
print '<td class="center">' . "\n";
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=unsetreportlastnumreleve">';
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=unsetreportlastnumreleve">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
@@ -422,7 +422,7 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">' . "\n";
|
print '<td class="center">' . "\n";
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),
|
||||||
'switch_off') . '</a>';
|
'switch_off') . '</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|||||||
@@ -199,8 +199,8 @@ print '<table class="noborder" width="100%">';
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td width="200" align="center">'.$langs->trans("Example").'</td>';
|
print '<td width="200" class="center">'.$langs->trans("Example").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("CodeBarGenerator").'</td>';
|
print '<td class="center" width="60">'.$langs->trans("CodeBarGenerator").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$sql = "SELECT rowid, code as encoding, libelle, coder, example";
|
$sql = "SELECT rowid, code as encoding, libelle, coder, example";
|
||||||
@@ -229,7 +229,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Show example
|
// Show example
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($obj->coder && $obj->coder != -1)
|
if ($obj->coder && $obj->coder != -1)
|
||||||
{
|
{
|
||||||
$result=0;
|
$result=0;
|
||||||
@@ -277,7 +277,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $formbarcode->setBarcodeEncoder($obj->coder, $barcodelist, $obj->rowid, 'form'.$i);
|
print $formbarcode->setBarcodeEncoder($obj->coder, $barcodelist, $obj->rowid, 'form'.$i);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
@@ -307,7 +307,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td width="60" align="center">'.$langs->trans("Value").'</td>';
|
print '<td width="60" class="center">'.$langs->trans("Value").'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ if (! isset($_SERVER['WINDIR']))
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("GenbarcodeLocation").'</td>';
|
print '<td>'.$langs->trans("GenbarcodeLocation").'</td>';
|
||||||
print '<td width="60" align="center">';
|
print '<td width="60" class="center">';
|
||||||
print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.$conf->global->GENBARCODE_LOCATION.'">';
|
print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.$conf->global->GENBARCODE_LOCATION.'">';
|
||||||
if (! empty($conf->global->GENBARCODE_LOCATION) && ! @file_exists($conf->global->GENBARCODE_LOCATION))
|
if (! empty($conf->global->GENBARCODE_LOCATION) && ! @file_exists($conf->global->GENBARCODE_LOCATION))
|
||||||
{
|
{
|
||||||
@@ -369,8 +369,8 @@ if ($conf->produit->enabled)
|
|||||||
print '<td width="140">'.$langs->trans("Name").'</td>';
|
print '<td width="140">'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td>'.$langs->trans("Example").'</td>';
|
print '<td>'.$langs->trans("Example").'</td>';
|
||||||
print '<td align="center" width="80">'.$langs->trans("Status").'</td>';
|
print '<td class="center" width="80">'.$langs->trans("Status").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("ShortInfo").'</td>';
|
print '<td class="center" width="60">'.$langs->trans("ShortInfo").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$dirbarcodenum=array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
|
$dirbarcodenum=array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
|
||||||
@@ -406,17 +406,17 @@ if ($conf->produit->enabled)
|
|||||||
|
|
||||||
if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file")
|
if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file")
|
||||||
{
|
{
|
||||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&value='.$file.'">';
|
print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&value='.$file.'">';
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&value='.$file.'">';
|
print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&value='.$file.'">';
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
$s=$modBarCode->getToolTip($langs, null, -1);
|
$s=$modBarCode->getToolTip($langs, null, -1);
|
||||||
print $form->textwithpicto('', $s, 1);
|
print $form->textwithpicto('', $s, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td width="300">'.$langs->trans("Box").'</td>';
|
print '<td width="300">'.$langs->trans("Box").'</td>';
|
||||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||||
print '<td>'.$langs->trans("SourceFile").'</td>';
|
print '<td>'.$langs->trans("SourceFile").'</td>';
|
||||||
print '<td width="160" align="center">'.$langs->trans("ActivateOn").'</td>';
|
print '<td width="160" class="center">'.$langs->trans("ActivateOn").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach($boxtoadd as $box)
|
foreach($boxtoadd as $box)
|
||||||
@@ -398,9 +398,9 @@ print '<table class="tagtable liste">'."\n";
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="300">'.$langs->trans("Box").'</td>';
|
print '<td width="300">'.$langs->trans("Box").'</td>';
|
||||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||||
print '<td align="center" width="160">'.$langs->trans("ActiveOn").'</td>';
|
print '<td class="center" width="160">'.$langs->trans("ActiveOn").'</td>';
|
||||||
print '<td align="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
|
print '<td class="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
|
||||||
print '<td align="center" width="80">'.$langs->trans("Disable").'</td>';
|
print '<td class="center" width="80">'.$langs->trans("Disable").'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
$box_order=1;
|
$box_order=1;
|
||||||
@@ -429,15 +429,15 @@ foreach($boxactivated as $key => $box)
|
|||||||
}
|
}
|
||||||
else print ($box->note?$box->note:' ');
|
else print ($box->note?$box->note:' ');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">' . (empty($pos_name[$box->position])?'':$langs->trans($pos_name[$box->position])) . '</td>';
|
print '<td class="center">' . (empty($pos_name[$box->position])?'':$langs->trans($pos_name[$box->position])) . '</td>';
|
||||||
$hasnext=($key < (count($boxactivated)-1));
|
$hasnext=($key < (count($boxactivated)-1));
|
||||||
$hasprevious=($key != 0);
|
$hasprevious=($key != 0);
|
||||||
print '<td align="center">'.($key+1).'</td>';
|
print '<td class="center">'.($key+1).'</td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print ($hasnext?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key+1]->rowid.'">'.img_down().'</a> ':'');
|
print ($hasnext?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key+1]->rowid.'">'.img_down().'</a> ':'');
|
||||||
print ($hasprevious?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key-1]->rowid.'">'.img_up().'</a>':'');
|
print ($hasprevious?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key-1]->rowid.'">'.img_up().'</a>':'');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print '<a href="boxes.php?rowid='.$box->rowid.'&action=delete">'.img_delete().'</a>';
|
print '<a href="boxes.php?rowid='.$box->rowid.'&action=delete">'.img_delete().'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td class="nowrap">'.$langs->trans("Example").'</td>';
|
print '<td class="nowrap">'.$langs->trans("Example").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||||
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@@ -177,7 +177,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else print $tmp;
|
else print $tmp;
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->global->CHEQUERECEIPTS_ADDON == $file || $conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file)
|
if ($conf->global->CHEQUERECEIPTS_ADDON == $file || $conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file)
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
@@ -206,7 +206,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||||
|
|
||||||
if ($conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file) // If module is the one used, we show existing errors
|
if ($conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file) // If module is the one used, we show existing errors
|
||||||
@@ -244,7 +244,7 @@ print '<input type="hidden" name="action" value="set_BANK_CHEQUERECEIPT_FREE_TEX
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameters").'</td>';
|
print '<td>'.$langs->trans("Parameters").'</td>';
|
||||||
print '<td align="center" width="60"> </td>';
|
print '<td class="center" width="60"> </td>';
|
||||||
print '<td width="80"> </td>';
|
print '<td width="80"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -267,8 +267,8 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td class="nowrap">'.$langs->trans("Example").'</td>';
|
print '<td class="nowrap">'.$langs->trans("Example").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||||
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@@ -312,7 +312,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else print $tmp;
|
else print $tmp;
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->global->COMMANDE_ADDON == $file)
|
if ($conf->global->COMMANDE_ADDON == $file)
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
@@ -344,7 +344,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -393,10 +393,10 @@ print "<table class=\"noborder\" width=\"100%\">\n";
|
|||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
|
print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||||
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
|
||||||
print '<td align="center" width="38">'.$langs->trans("ShortInfo").'</td>';
|
print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
|
||||||
print '<td align="center" width="38">'.$langs->trans("Preview").'</td>';
|
print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@@ -449,7 +449,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
@@ -457,13 +457,13 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default
|
// Default
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->global->COMMANDE_ADDON_PDF == $name)
|
if ($conf->global->COMMANDE_ADDON_PDF == $name)
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
@@ -491,12 +491,12 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||||
|
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Preview
|
// Preview
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($module->type == 'pdf')
|
if ($module->type == 'pdf')
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
|
||||||
@@ -528,7 +528,7 @@ print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
print '<td class="center" width="60">'.$langs->trans("Value").'</td>';
|
||||||
print "<td> </td>\n";
|
print "<td> </td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -580,7 +580,7 @@ Whet is definition of "shippable" according to all different STOCK_CALCULATE_...
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>';
|
print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
|
if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&value=0">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&value=0">';
|
||||||
print img_picto($langs->trans("Activated"),'switch_on');
|
print img_picto($langs->trans("Activated"),'switch_on');
|
||||||
@@ -598,7 +598,7 @@ if ($conf->banque->enabled)
|
|||||||
{
|
{
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td> </td><td align="center">';
|
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td> </td><td class="center">';
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER');
|
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER');
|
||||||
@@ -620,7 +620,7 @@ else
|
|||||||
{
|
{
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td> </td><td class="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask for warehouse during order
|
// Ask for warehouse during order
|
||||||
@@ -628,7 +628,7 @@ if ($conf->stock->enabled)
|
|||||||
{
|
{
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td align="center">';
|
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td class="center">';
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER');
|
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER');
|
||||||
@@ -650,7 +650,7 @@ else
|
|||||||
{
|
{
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td class="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -666,7 +666,7 @@ print load_fiche_titre($langs->trans("Notifications"), '', '');
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td align="center" width="60"></td>';
|
print '<td class="center" width="60"></td>';
|
||||||
print '<td width="80"> </td>';
|
print '<td width="80"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ print '<td>'.$langs->trans("Name").'</td>';
|
|||||||
print '<td>'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
print '<td>'.$langs->trans("Comment").'</td>';
|
print '<td>'.$langs->trans("Comment").'</td>';
|
||||||
if (! empty($conf->multicompany->enabled) && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>';
|
if (! empty($conf->multicompany->enabled) && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Action").'</td>';
|
print '<td class="center">'.$langs->trans("Action").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -210,11 +210,11 @@ if (! empty($conf->multicompany->enabled) && !$user->entity)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
|
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
||||||
}
|
}
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">';
|
||||||
@@ -273,11 +273,11 @@ if ($result)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
|
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print '<input type="hidden" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
|
print '<input type="hidden" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,8 +204,8 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td width="100">'.$langs->trans("Name").'</td>';
|
print '<td width="100">'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td>'.$langs->trans("Example").'</td>';
|
print '<td>'.$langs->trans("Example").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||||
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@@ -249,7 +249,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else print $tmp;
|
else print $tmp;
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->global->CONTRACT_ADDON == "$file")
|
if ($conf->global->CONTRACT_ADDON == "$file")
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
@@ -280,7 +280,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -329,10 +329,10 @@ print '<table class="noborder" width="100%">';
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
|
print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||||
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
|
||||||
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||||
print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
|
print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
@@ -384,7 +384,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
@@ -392,13 +392,13 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td class="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defaut
|
// Defaut
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->global->CONTRACT_ADDON_PDF == $name)
|
if ($conf->global->CONTRACT_ADDON_PDF == $name)
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("Default"), 'on');
|
print img_picto($langs->trans("Default"), 'on');
|
||||||
@@ -424,12 +424,12 @@ foreach ($dirmodels as $reldir)
|
|||||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||||
|
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Preview
|
// Preview
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($module->type == 'pdf')
|
if ($module->type == 'pdf')
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';
|
||||||
@@ -466,7 +466,7 @@ print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
print '<td class="center" width="60">'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$substitutionarray=pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
|
$substitutionarray=pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
|
||||||
|
|||||||
@@ -322,11 +322,11 @@ if (! empty($conf->multicompany->enabled) && !$user->entity)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
$disabled='';
|
$disabled='';
|
||||||
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) $disabled=' disabled="disabled"';
|
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) $disabled=' disabled="disabled"';
|
||||||
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add">';
|
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add">';
|
||||||
@@ -385,7 +385,7 @@ if ($result)
|
|||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($action != 'edit' || GETPOST('rowid') != $obj->rowid)
|
if ($action != 'edit' || GETPOST('rowid') != $obj->rowid)
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&mode='.$mode.'&action=edit'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_edit().'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&mode='.$mode.'&action=edit'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_edit().'</a>';
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ $hookmanager->initHooks(array('admin'));
|
|||||||
// Put here declaration of dictionaries properties
|
// Put here declaration of dictionaries properties
|
||||||
|
|
||||||
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
||||||
$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,24,28,17,35,36,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,26,0,25,0);
|
$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,24,28,17,35,36,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,26,37,0,25,0);
|
||||||
|
|
||||||
// Name of SQL tables of dictionaries
|
// Name of SQL tables of dictionaries
|
||||||
$tabname=array();
|
$tabname=array();
|
||||||
@@ -117,7 +117,7 @@ $tabname[22]= MAIN_DB_PREFIX."c_input_reason";
|
|||||||
$tabname[23]= MAIN_DB_PREFIX."c_revenuestamp";
|
$tabname[23]= MAIN_DB_PREFIX."c_revenuestamp";
|
||||||
$tabname[24]= MAIN_DB_PREFIX."c_type_resource";
|
$tabname[24]= MAIN_DB_PREFIX."c_type_resource";
|
||||||
$tabname[25]= MAIN_DB_PREFIX."c_type_container";
|
$tabname[25]= MAIN_DB_PREFIX."c_type_container";
|
||||||
$tabname[26]= MAIN_DB_PREFIX."c_units";
|
//$tabname[26]= MAIN_DB_PREFIX."c_units";
|
||||||
$tabname[27]= MAIN_DB_PREFIX."c_stcomm";
|
$tabname[27]= MAIN_DB_PREFIX."c_stcomm";
|
||||||
$tabname[28]= MAIN_DB_PREFIX."c_holiday_types";
|
$tabname[28]= MAIN_DB_PREFIX."c_holiday_types";
|
||||||
$tabname[29]= MAIN_DB_PREFIX."c_lead_status";
|
$tabname[29]= MAIN_DB_PREFIX."c_lead_status";
|
||||||
@@ -128,6 +128,7 @@ $tabname[33]= MAIN_DB_PREFIX."c_hrm_department";
|
|||||||
$tabname[34]= MAIN_DB_PREFIX."c_hrm_function";
|
$tabname[34]= MAIN_DB_PREFIX."c_hrm_function";
|
||||||
$tabname[35]= MAIN_DB_PREFIX."c_exp_tax_cat";
|
$tabname[35]= MAIN_DB_PREFIX."c_exp_tax_cat";
|
||||||
$tabname[36]= MAIN_DB_PREFIX."c_exp_tax_range";
|
$tabname[36]= MAIN_DB_PREFIX."c_exp_tax_range";
|
||||||
|
$tabname[37]= MAIN_DB_PREFIX."c_units";
|
||||||
|
|
||||||
// Dictionary labels
|
// Dictionary labels
|
||||||
$tablib=array();
|
$tablib=array();
|
||||||
@@ -156,7 +157,7 @@ $tablib[22]= "DictionarySource";
|
|||||||
$tablib[23]= "DictionaryRevenueStamp";
|
$tablib[23]= "DictionaryRevenueStamp";
|
||||||
$tablib[24]= "DictionaryResourceType";
|
$tablib[24]= "DictionaryResourceType";
|
||||||
$tablib[25]= "DictionaryTypeOfContainer";
|
$tablib[25]= "DictionaryTypeOfContainer";
|
||||||
$tablib[26]= "DictionaryUnits";
|
//$tablib[26]= "DictionaryUnits";
|
||||||
$tablib[27]= "DictionaryProspectStatus";
|
$tablib[27]= "DictionaryProspectStatus";
|
||||||
$tablib[28]= "DictionaryHolidayTypes";
|
$tablib[28]= "DictionaryHolidayTypes";
|
||||||
$tablib[29]= "DictionaryOpportunityStatus";
|
$tablib[29]= "DictionaryOpportunityStatus";
|
||||||
@@ -167,6 +168,7 @@ $tablib[33]= "DictionaryDepartment";
|
|||||||
$tablib[34]= "DictionaryFunction";
|
$tablib[34]= "DictionaryFunction";
|
||||||
$tablib[35]= "DictionaryExpenseTaxCat";
|
$tablib[35]= "DictionaryExpenseTaxCat";
|
||||||
$tablib[36]= "DictionaryExpenseTaxRange";
|
$tablib[36]= "DictionaryExpenseTaxRange";
|
||||||
|
$tablib[37]= "DictionaryMeasuringUnits";
|
||||||
|
|
||||||
// Requests to extract data
|
// Requests to extract data
|
||||||
$tabsql=array();
|
$tabsql=array();
|
||||||
@@ -195,7 +197,7 @@ $tabsql[22]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX
|
|||||||
$tabsql[23]= "SELECT t.rowid as rowid, t.taux, t.revenuestamp_type, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid";
|
$tabsql[23]= "SELECT t.rowid as rowid, t.taux, t.revenuestamp_type, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid";
|
||||||
$tabsql[24]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource";
|
$tabsql[24]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource";
|
||||||
$tabsql[25]= "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity IN (".getEntity('c_type_container').")";
|
$tabsql[25]= "SELECT rowid as rowid, code, label, active, module FROM ".MAIN_DB_PREFIX."c_type_container as t WHERE t.entity IN (".getEntity('c_type_container').")";
|
||||||
$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units";
|
//$tabsql[26]= "SELECT rowid as rowid, code, label, short_label, active FROM ".MAIN_DB_PREFIX."c_units";
|
||||||
$tabsql[27]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_stcomm";
|
$tabsql[27]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_stcomm";
|
||||||
$tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newbymonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
$tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.newbymonth, h.fk_country as country_id, c.code as country_code, c.label as country, h.active FROM ".MAIN_DB_PREFIX."c_holiday_types as h LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON h.fk_country=c.rowid";
|
||||||
$tabsql[29]= "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
|
$tabsql[29]= "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
|
||||||
@@ -206,6 +208,7 @@ $tabsql[33]= "SELECT rowid, pos, code, label, active FROM ".MAIN_DB_PREFIX."c_hr
|
|||||||
$tabsql[34]= "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PREFIX."c_hrm_function";
|
$tabsql[34]= "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PREFIX."c_hrm_function";
|
||||||
$tabsql[35]= "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c";
|
$tabsql[35]= "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c";
|
||||||
$tabsql[36]= "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r";
|
$tabsql[36]= "SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, r.active, r.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_range r";
|
||||||
|
$tabsql[37]= "SELECT r.rowid, r.code, r.label, r.short_label, r.unit_type, r.scale, r.active FROM ".MAIN_DB_PREFIX."c_units r";
|
||||||
|
|
||||||
// Criteria to sort dictionaries
|
// Criteria to sort dictionaries
|
||||||
$tabsqlsort=array();
|
$tabsqlsort=array();
|
||||||
@@ -234,7 +237,7 @@ $tabsqlsort[22]="code ASC, label ASC";
|
|||||||
$tabsqlsort[23]="country ASC, taux ASC";
|
$tabsqlsort[23]="country ASC, taux ASC";
|
||||||
$tabsqlsort[24]="code ASC, label ASC";
|
$tabsqlsort[24]="code ASC, label ASC";
|
||||||
$tabsqlsort[25]="t.module ASC, t.code ASC, t.label ASC";
|
$tabsqlsort[25]="t.module ASC, t.code ASC, t.label ASC";
|
||||||
$tabsqlsort[26]="code ASC";
|
//$tabsqlsort[26]="code ASC";
|
||||||
$tabsqlsort[27]="code ASC";
|
$tabsqlsort[27]="code ASC";
|
||||||
$tabsqlsort[28]="country ASC, code ASC";
|
$tabsqlsort[28]="country ASC, code ASC";
|
||||||
$tabsqlsort[29]="position ASC";
|
$tabsqlsort[29]="position ASC";
|
||||||
@@ -245,6 +248,7 @@ $tabsqlsort[33]="code ASC";
|
|||||||
$tabsqlsort[34]="code ASC";
|
$tabsqlsort[34]="code ASC";
|
||||||
$tabsqlsort[35]="c.label ASC";
|
$tabsqlsort[35]="c.label ASC";
|
||||||
$tabsqlsort[36]="r.fk_c_exp_tax_cat ASC, r.range_ik ASC";
|
$tabsqlsort[36]="r.fk_c_exp_tax_cat ASC, r.range_ik ASC";
|
||||||
|
$tabsqlsort[37]="r.unit_type ASC, r.scale ASC, r.code ASC";
|
||||||
|
|
||||||
// Nom des champs en resultat de select pour affichage du dictionnaire
|
// Nom des champs en resultat de select pour affichage du dictionnaire
|
||||||
$tabfield=array();
|
$tabfield=array();
|
||||||
@@ -273,7 +277,7 @@ $tabfield[22]= "code,label";
|
|||||||
$tabfield[23]= "country_id,country,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note";
|
$tabfield[23]= "country_id,country,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note";
|
||||||
$tabfield[24]= "code,label";
|
$tabfield[24]= "code,label";
|
||||||
$tabfield[25]= "code,label";
|
$tabfield[25]= "code,label";
|
||||||
$tabfield[26]= "code,label,short_label";
|
//$tabfield[26]= "code,label,short_label";
|
||||||
$tabfield[27]= "code,libelle";
|
$tabfield[27]= "code,libelle";
|
||||||
$tabfield[28]= "code,label,affect,delay,newbymonth,country_id,country";
|
$tabfield[28]= "code,label,affect,delay,newbymonth,country_id,country";
|
||||||
$tabfield[29]= "code,label,percent,position";
|
$tabfield[29]= "code,label,percent,position";
|
||||||
@@ -284,6 +288,7 @@ $tabfield[33]= "code,label";
|
|||||||
$tabfield[34]= "code,label";
|
$tabfield[34]= "code,label";
|
||||||
$tabfield[35]= "label";
|
$tabfield[35]= "label";
|
||||||
$tabfield[36]= "range_ik,fk_c_exp_tax_cat";
|
$tabfield[36]= "range_ik,fk_c_exp_tax_cat";
|
||||||
|
$tabfield[37]= "code,label,short_label,unit_type,scale";
|
||||||
|
|
||||||
// Nom des champs d'edition pour modification d'un enregistrement
|
// Nom des champs d'edition pour modification d'un enregistrement
|
||||||
$tabfieldvalue=array();
|
$tabfieldvalue=array();
|
||||||
@@ -312,7 +317,7 @@ $tabfieldvalue[22]= "code,label";
|
|||||||
$tabfieldvalue[23]= "country,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note";
|
$tabfieldvalue[23]= "country,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note";
|
||||||
$tabfieldvalue[24]= "code,label";
|
$tabfieldvalue[24]= "code,label";
|
||||||
$tabfieldvalue[25]= "code,label";
|
$tabfieldvalue[25]= "code,label";
|
||||||
$tabfieldvalue[26]= "code,label,short_label";
|
//$tabfieldvalue[26]= "code,label,short_label";
|
||||||
$tabfieldvalue[27]= "code,libelle";
|
$tabfieldvalue[27]= "code,libelle";
|
||||||
$tabfieldvalue[28]= "code,label,affect,delay,newbymonth,country";
|
$tabfieldvalue[28]= "code,label,affect,delay,newbymonth,country";
|
||||||
$tabfieldvalue[29]= "code,label,percent,position";
|
$tabfieldvalue[29]= "code,label,percent,position";
|
||||||
@@ -323,6 +328,7 @@ $tabfieldvalue[33]= "code,label";
|
|||||||
$tabfieldvalue[34]= "code,label";
|
$tabfieldvalue[34]= "code,label";
|
||||||
$tabfieldvalue[35]= "label";
|
$tabfieldvalue[35]= "label";
|
||||||
$tabfieldvalue[36]= "range_ik,fk_c_exp_tax_cat";
|
$tabfieldvalue[36]= "range_ik,fk_c_exp_tax_cat";
|
||||||
|
$tabfieldvalue[37]= "code,label,short_label,unit_type,scale";
|
||||||
|
|
||||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
// Nom des champs dans la table pour insertion d'un enregistrement
|
||||||
$tabfieldinsert=array();
|
$tabfieldinsert=array();
|
||||||
@@ -351,7 +357,7 @@ $tabfieldinsert[22]= "code,label";
|
|||||||
$tabfieldinsert[23]= "fk_pays,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note";
|
$tabfieldinsert[23]= "fk_pays,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note";
|
||||||
$tabfieldinsert[24]= "code,label";
|
$tabfieldinsert[24]= "code,label";
|
||||||
$tabfieldinsert[25]= "code,label";
|
$tabfieldinsert[25]= "code,label";
|
||||||
$tabfieldinsert[26]= "code,label,short_label";
|
//$tabfieldinsert[26]= "code,label,short_label";
|
||||||
$tabfieldinsert[27]= "code,libelle";
|
$tabfieldinsert[27]= "code,libelle";
|
||||||
$tabfieldinsert[28]= "code,label,affect,delay,newbymonth,fk_country";
|
$tabfieldinsert[28]= "code,label,affect,delay,newbymonth,fk_country";
|
||||||
$tabfieldinsert[29]= "code,label,percent,position";
|
$tabfieldinsert[29]= "code,label,percent,position";
|
||||||
@@ -362,6 +368,7 @@ $tabfieldinsert[33]= "code,label";
|
|||||||
$tabfieldinsert[34]= "code,label";
|
$tabfieldinsert[34]= "code,label";
|
||||||
$tabfieldinsert[35]= "label";
|
$tabfieldinsert[35]= "label";
|
||||||
$tabfieldinsert[36]= "range_ik,fk_c_exp_tax_cat";
|
$tabfieldinsert[36]= "range_ik,fk_c_exp_tax_cat";
|
||||||
|
$tabfieldinsert[37]= "code,label,short_label,unit_type,scale";
|
||||||
|
|
||||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
// Nom du rowid si le champ n'est pas de type autoincrement
|
||||||
// Example: "" if id field is "rowid" and has autoincrement on
|
// Example: "" if id field is "rowid" and has autoincrement on
|
||||||
@@ -392,7 +399,7 @@ $tabrowid[22]= "rowid";
|
|||||||
$tabrowid[23]= "";
|
$tabrowid[23]= "";
|
||||||
$tabrowid[24]= "";
|
$tabrowid[24]= "";
|
||||||
$tabrowid[25]= "";
|
$tabrowid[25]= "";
|
||||||
$tabrowid[26]= "";
|
//$tabrowid[26]= "";
|
||||||
$tabrowid[27]= "id";
|
$tabrowid[27]= "id";
|
||||||
$tabrowid[28]= "";
|
$tabrowid[28]= "";
|
||||||
$tabrowid[29]= "";
|
$tabrowid[29]= "";
|
||||||
@@ -403,6 +410,7 @@ $tabrowid[33]= "rowid";
|
|||||||
$tabrowid[34]= "rowid";
|
$tabrowid[34]= "rowid";
|
||||||
$tabrowid[35]= "";
|
$tabrowid[35]= "";
|
||||||
$tabrowid[36]= "";
|
$tabrowid[36]= "";
|
||||||
|
$tabrowid[37]= "";
|
||||||
|
|
||||||
// Condition to show dictionary in setup page
|
// Condition to show dictionary in setup page
|
||||||
$tabcond=array();
|
$tabcond=array();
|
||||||
@@ -431,7 +439,7 @@ $tabcond[22]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabl
|
|||||||
$tabcond[23]= true;
|
$tabcond[23]= true;
|
||||||
$tabcond[24]= ! empty($conf->resource->enabled);
|
$tabcond[24]= ! empty($conf->resource->enabled);
|
||||||
$tabcond[25]= ! empty($conf->website->enabled);
|
$tabcond[25]= ! empty($conf->website->enabled);
|
||||||
$tabcond[26]= ! empty($conf->product->enabled);
|
//$tabcond[26]= ! empty($conf->product->enabled);
|
||||||
$tabcond[27]= ! empty($conf->societe->enabled);
|
$tabcond[27]= ! empty($conf->societe->enabled);
|
||||||
$tabcond[28]= ! empty($conf->holiday->enabled);
|
$tabcond[28]= ! empty($conf->holiday->enabled);
|
||||||
$tabcond[29]= ! empty($conf->projet->enabled);
|
$tabcond[29]= ! empty($conf->projet->enabled);
|
||||||
@@ -442,6 +450,7 @@ $tabcond[33]= ! empty($conf->hrm->enabled);
|
|||||||
$tabcond[34]= ! empty($conf->hrm->enabled);
|
$tabcond[34]= ! empty($conf->hrm->enabled);
|
||||||
$tabcond[35]= ! empty($conf->expensereport->enabled);
|
$tabcond[35]= ! empty($conf->expensereport->enabled);
|
||||||
$tabcond[36]= ! empty($conf->expensereport->enabled);
|
$tabcond[36]= ! empty($conf->expensereport->enabled);
|
||||||
|
$tabcond[37]= ! empty($conf->product->enabled);
|
||||||
|
|
||||||
// List of help for fields
|
// List of help for fields
|
||||||
$tabhelp=array();
|
$tabhelp=array();
|
||||||
@@ -470,7 +479,7 @@ $tabhelp[22] = array('code'=>$langs->trans("EnterAnyCode"));
|
|||||||
$tabhelp[23] = array('revenuestamp_type'=>'FixedOfPercent');
|
$tabhelp[23] = array('revenuestamp_type'=>'FixedOfPercent');
|
||||||
$tabhelp[24] = array('code'=>$langs->trans("EnterAnyCode"));
|
$tabhelp[24] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||||
$tabhelp[25] = array('code'=>$langs->trans('EnterAnyCode'));
|
$tabhelp[25] = array('code'=>$langs->trans('EnterAnyCode'));
|
||||||
$tabhelp[26] = array('code'=>$langs->trans("EnterAnyCode"));
|
//$tabhelp[26] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||||
$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"));
|
$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||||
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$langs->trans("MinimumNoticePeriod"), 'newbymonth'=>$langs->trans("NbAddedAutomatically"));
|
$tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$langs->trans("MinimumNoticePeriod"), 'newbymonth'=>$langs->trans("NbAddedAutomatically"));
|
||||||
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
|
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
|
||||||
@@ -481,6 +490,7 @@ $tabhelp[33] = array('code'=>$langs->trans("EnterAnyCode"));
|
|||||||
$tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode"));
|
$tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||||
$tabhelp[35]= array();
|
$tabhelp[35]= array();
|
||||||
$tabhelp[36]= array('range_ik'=>$langs->trans('PrevRangeToThisRange'));
|
$tabhelp[36]= array('range_ik'=>$langs->trans('PrevRangeToThisRange'));
|
||||||
|
$tabhelp[37]= array('code'=>$langs->trans("EnterAnyCode"));
|
||||||
|
|
||||||
// List of check for fields (NOT USED YET)
|
// List of check for fields (NOT USED YET)
|
||||||
$tabfieldcheck=array();
|
$tabfieldcheck=array();
|
||||||
@@ -509,7 +519,7 @@ $tabfieldcheck[22] = array();
|
|||||||
$tabfieldcheck[23] = array();
|
$tabfieldcheck[23] = array();
|
||||||
$tabfieldcheck[24] = array();
|
$tabfieldcheck[24] = array();
|
||||||
$tabfieldcheck[25] = array();
|
$tabfieldcheck[25] = array();
|
||||||
$tabfieldcheck[26] = array();
|
//$tabfieldcheck[26] = array();
|
||||||
$tabfieldcheck[27] = array();
|
$tabfieldcheck[27] = array();
|
||||||
$tabfieldcheck[28] = array();
|
$tabfieldcheck[28] = array();
|
||||||
$tabfieldcheck[29] = array();
|
$tabfieldcheck[29] = array();
|
||||||
@@ -520,6 +530,7 @@ $tabfieldcheck[33] = array();
|
|||||||
$tabfieldcheck[34] = array();
|
$tabfieldcheck[34] = array();
|
||||||
$tabfieldcheck[35]= array();
|
$tabfieldcheck[35]= array();
|
||||||
$tabfieldcheck[36]= array();
|
$tabfieldcheck[36]= array();
|
||||||
|
$tabfieldcheck[37]= array();
|
||||||
|
|
||||||
// Complete all arrays with entries found into modules
|
// Complete all arrays with entries found into modules
|
||||||
complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqlsort, $tabfield, $tabfieldvalue, $tabfieldinsert, $tabrowid, $tabcond, $tabhelp, $tabfieldcheck);
|
complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqlsort, $tabfield, $tabfieldvalue, $tabfieldinsert, $tabrowid, $tabcond, $tabhelp, $tabfieldcheck);
|
||||||
@@ -1169,7 +1180,7 @@ if ($id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($id == 4) print '<td></td>';
|
if ($id == 4) print '<td></td>';
|
||||||
print '<td colspan="3" align="center">';
|
print '<td colspan="3" class="center">';
|
||||||
if ($action != 'edit')
|
if ($action != 'edit')
|
||||||
{
|
{
|
||||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||||
@@ -1583,6 +1594,12 @@ if ($id)
|
|||||||
{
|
{
|
||||||
$valuetoshow = $langs->trans($valuetoshow);
|
$valuetoshow = $langs->trans($valuetoshow);
|
||||||
}
|
}
|
||||||
|
elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_units')
|
||||||
|
{
|
||||||
|
$langs->load('other');
|
||||||
|
$key = $langs->trans($obj->label);
|
||||||
|
$valuetoshow = ($obj->label && $key != strtoupper($obj->label) ? $key : $obj->{$fieldlist[$field]});
|
||||||
|
}
|
||||||
|
|
||||||
$class='tddict';
|
$class='tddict';
|
||||||
if ($fieldlist[$field] == 'note' && $id == 10) $class.=' tdoverflowmax200';
|
if ($fieldlist[$field] == 'note' && $id == 10) $class.=' tdoverflowmax200';
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ print '<br>';
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td class="center" width="20"> </td>';
|
||||||
print '<td align="center" width="100">'.$langs->trans("Value").'</td>'."\n";
|
print '<td class="center" width="100">'.$langs->trans("Value").'</td>'."\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@@ -87,9 +87,9 @@ $form = new Form($db);
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("ECMAutoTree").'</td>';
|
print '<td>'.$langs->trans("ECMAutoTree").'</td>';
|
||||||
print '<td align="center" width="20"> </td>';
|
print '<td class="center" width="20"> </td>';
|
||||||
|
|
||||||
print '<td align="center" width="100">';
|
print '<td class="center" width="100">';
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print ajax_constantonoff('ECM_AUTO_TREE_ENABLED');
|
print ajax_constantonoff('ECM_AUTO_TREE_ENABLED');
|
||||||
|
|||||||
@@ -412,7 +412,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
|||||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
|
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -480,7 +480,7 @@ while ($i < min($num, $limit))
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap" align="center">';
|
print '<td class="nowrap center">';
|
||||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
{
|
{
|
||||||
$selected=0;
|
$selected=0;
|
||||||
|
|||||||
@@ -144,9 +144,9 @@ if ($action == 'add')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$leftmenu=''; $mainmenu='';
|
$leftmenu=''; $mainmenu='';
|
||||||
if (GETPOST('menuId', 'int') && ! is_numeric(GETPOST('menuId', 'int')))
|
if (GETPOST('menuId', 'alpha', 3) && ! is_numeric(GETPOST('menuId', 'alpha', 3)))
|
||||||
{
|
{
|
||||||
$tmp=explode('&', GETPOST('menuId', 'int'));
|
$tmp=explode('&', GETPOST('menuId', 'alpha', 3));
|
||||||
foreach($tmp as $s)
|
foreach($tmp as $s)
|
||||||
{
|
{
|
||||||
if (preg_match('/fk_mainmenu=/', $s))
|
if (preg_match('/fk_mainmenu=/', $s))
|
||||||
@@ -214,9 +214,9 @@ if ($action == 'add')
|
|||||||
$menu->target=GETPOST('target', 'alpha');
|
$menu->target=GETPOST('target', 'alpha');
|
||||||
$menu->user=GETPOST('user', 'alpha');
|
$menu->user=GETPOST('user', 'alpha');
|
||||||
$menu->mainmenu=GETPOST('propertymainmenu', 'alpha');
|
$menu->mainmenu=GETPOST('propertymainmenu', 'alpha');
|
||||||
if (is_numeric(GETPOST('menuId', 'int')))
|
if (is_numeric(GETPOST('menuId', 'alpha', 3)))
|
||||||
{
|
{
|
||||||
$menu->fk_menu=GETPOST('menuId', 'int');
|
$menu->fk_menu=GETPOST('menuId', 'alpha', 3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -253,12 +253,24 @@ if ($action == 'delete')
|
|||||||
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".GETPOST('menuId', 'int'), $langs->trans("DeleteMenu"), $langs->trans("ConfirmDeleteMenu", $obj->titre), "confirm_delete");
|
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".GETPOST('menuId', 'int'), $langs->trans("DeleteMenu"), $langs->trans("ConfirmDeleteMenu", $obj->titre), "confirm_delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$newcardbutton='';
|
||||||
|
if ($user->admin)
|
||||||
|
{
|
||||||
|
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle">'.$langs->trans('New').'</span>';
|
||||||
|
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||||
|
$newcardbutton.= '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<form name="newmenu" class="nocellnopadd" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="newmenu" class="nocellnopadd" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" action="change_menu_handler">';
|
print '<input type="hidden" action="change_menu_handler">';
|
||||||
print $langs->trans("MenuHandler").': ';
|
print $langs->trans("MenuHandler").': ';
|
||||||
$formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler)?'':'_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone));
|
$formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler)?'':'_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone));
|
||||||
print ' <input type="submit" class="button" value="'.$langs->trans("Refresh").'">';
|
print ' <input type="submit" class="button" value="'.$langs->trans("Refresh").'">';
|
||||||
|
|
||||||
|
print '<div class="floatright">';
|
||||||
|
print $newcardbutton;
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@@ -394,14 +406,6 @@ if ($conf->use_javascript_ajax)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Boutons actions
|
|
||||||
*/
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'">'.$langs->trans("NewMenu").'</a>';
|
|
||||||
print '</div>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,6 +154,13 @@ if ($mode == 'setup' && $user->admin)
|
|||||||
$urltodelete='';
|
$urltodelete='';
|
||||||
$urltocheckperms='';
|
$urltocheckperms='';
|
||||||
}
|
}
|
||||||
|
elseif ($key[0] == 'OAUTH_STRIPE_LIVE_NAME')
|
||||||
|
{
|
||||||
|
$OAUTH_SERVICENAME='StripeLive';
|
||||||
|
$urltorenew=$urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php');
|
||||||
|
$urltodelete='';
|
||||||
|
$urltocheckperms='';
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$urltorenew='';
|
$urltorenew='';
|
||||||
|
|||||||
@@ -409,12 +409,12 @@ print '<table class="noborder" width="100%">';
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print "<td>".$langs->trans("Other")."</td>\n";
|
print "<td>".$langs->trans("Other")."</td>\n";
|
||||||
print '<td align="center">'.$langs->trans("Status").'</td>'."\n";
|
print '<td class="center">'.$langs->trans("Status").'</td>'."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("UserWarehouseAutoCreate").'</td>';
|
print '<td>'.$langs->trans("UserWarehouseAutoCreate").'</td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('STOCK_USERSTOCK_AUTOCREATE');
|
print ajax_constantonoff('STOCK_USERSTOCK_AUTOCREATE');
|
||||||
} else {
|
} else {
|
||||||
@@ -428,7 +428,7 @@ print '<tr class="oddeven">';
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->textwithpicto($langs->trans("StockSupportServices"), $langs->trans("StockSupportServicesDesc"));
|
print $form->textwithpicto($langs->trans("StockSupportServices"), $langs->trans("StockSupportServicesDesc"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('STOCK_SUPPORTS_SERVICES');
|
print ajax_constantonoff('STOCK_SUPPORTS_SERVICES');
|
||||||
} else {
|
} else {
|
||||||
@@ -440,7 +440,7 @@ print "</tr>\n";
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("AllowAddLimitStockByWarehouse").'</td>';
|
print '<td>'.$langs->trans("AllowAddLimitStockByWarehouse").'</td>';
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE');
|
print ajax_constantonoff('STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE');
|
||||||
} else {
|
} else {
|
||||||
@@ -451,10 +451,9 @@ print "</td>\n";
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if (! empty($conf->fournisseur->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) {
|
if (! empty($conf->fournisseur->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) {
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("UseDispatchStatus").'</td>';
|
print '<td>'.$langs->trans("UseDispatchStatus").'</td>';
|
||||||
print '<td class="right">';
|
print '<td class="center">';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('SUPPLIER_ORDER_USE_DISPATCH_STATUS');
|
print ajax_constantonoff('SUPPLIER_ORDER_USE_DISPATCH_STATUS');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
$obj_facturation = unserialize($_SESSION['serObjFacturation']);
|
$obj_facturation = unserialize($_SESSION['serObjFacturation']);
|
||||||
unset ($_SESSION['serObjFacturation']);
|
unset($_SESSION['serObjFacturation']);
|
||||||
|
|
||||||
|
|
||||||
switch($action)
|
switch($action)
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ switch ($action)
|
|||||||
// End of case: valide_facture
|
// End of case: valide_facture
|
||||||
}
|
}
|
||||||
|
|
||||||
unset ($_SESSION['serObjFacturation']);
|
unset($_SESSION['serObjFacturation']);
|
||||||
|
|
||||||
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
|
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
|
||||||
|
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ class Categories extends DolibarrApi
|
|||||||
|
|
||||||
if ($this->category->update(DolibarrApiAccess::$user) > 0)
|
if ($this->category->update(DolibarrApiAccess::$user) > 0)
|
||||||
{
|
{
|
||||||
return $this->get ($id);
|
return $this->get($id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1472,8 +1472,7 @@ class Categorie extends CommonObject
|
|||||||
// We want to reverse lookup
|
// We want to reverse lookup
|
||||||
$map_type = array_flip($this->MAP_ID);
|
$map_type = array_flip($this->MAP_ID);
|
||||||
$type = $map_type[$type];
|
$type = $map_type[$type];
|
||||||
dol_syslog( get_class($this) . "::rechercher(): numeric types are deprecated, please use string instead",
|
dol_syslog(get_class($this) . "::rechercher(): numeric types are deprecated, please use string instead", LOG_WARNING);
|
||||||
LOG_WARNING );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generation requete recherche
|
// Generation requete recherche
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -96,7 +97,7 @@ class ICal
|
|||||||
* Translate Calendar
|
* Translate Calendar
|
||||||
*
|
*
|
||||||
* @param string $uri Url
|
* @param string $uri Url
|
||||||
* @return array
|
* @return array|string
|
||||||
*/
|
*/
|
||||||
function parse($uri)
|
function parse($uri)
|
||||||
{
|
{
|
||||||
@@ -363,9 +364,9 @@ class ICal
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return sorted eventlist as array or false if calenar is empty
|
* Return sorted eventlist as array or false if calendar is empty
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array|false
|
||||||
*/
|
*/
|
||||||
function get_sort_event_list()
|
function get_sort_event_list()
|
||||||
{
|
{
|
||||||
@@ -398,7 +399,7 @@ class ICal
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return eventlist array (not sort eventlist array)
|
* Return eventlist array (not sorted eventlist array)
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@@ -422,7 +423,7 @@ class ICal
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return to do array (not sort to do array)
|
* Return to do array (not sorted todo array)
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -740,7 +740,7 @@ $db->close();
|
|||||||
/**
|
/**
|
||||||
* Show event line of a particular day for a user
|
* Show event line of a particular day for a user
|
||||||
*
|
*
|
||||||
* @param string $username Login
|
* @param User $username Login
|
||||||
* @param int $day Day
|
* @param int $day Day
|
||||||
* @param int $month Month
|
* @param int $month Month
|
||||||
* @param int $year Year
|
* @param int $year Year
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -888,7 +888,7 @@ $db->close();
|
|||||||
/**
|
/**
|
||||||
* Show event line of a particular day for a user
|
* Show event line of a particular day for a user
|
||||||
*
|
*
|
||||||
* @param string $username Login
|
* @param User $username Login
|
||||||
* @param int $day Day
|
* @param int $day Day
|
||||||
* @param int $month Month
|
* @param int $month Month
|
||||||
* @param int $year Year
|
* @param int $year Year
|
||||||
|
|||||||
@@ -1,492 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/comm/address.php
|
|
||||||
* \ingroup societe
|
|
||||||
* \brief Tab address of thirdparty
|
|
||||||
*/
|
|
||||||
|
|
||||||
require '../main.inc.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/address.class.php';
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array('companies', 'commercial'));
|
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
|
||||||
$action = GETPOST('action', 'alpha');
|
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
|
||||||
$origin = GETPOST('origin', 'alpha');
|
|
||||||
$originid = GETPOST('originid', 'int');
|
|
||||||
$socid = GETPOST('socid', 'int');
|
|
||||||
if (! $socid && ($action != 'create' && $action != 'add' && $action != 'update')) accessforbidden();
|
|
||||||
|
|
||||||
// Security check
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
|
||||||
$result = restrictedArea($user, 'societe', $socid);
|
|
||||||
|
|
||||||
$object = new Address($db);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Cancel
|
|
||||||
if (GETPOST('cancel', 'alpha') && ! empty($backtopage))
|
|
||||||
{
|
|
||||||
header("Location: ".$backtopage);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'add' || $action == 'update')
|
|
||||||
{
|
|
||||||
$object->socid = $socid;
|
|
||||||
$object->label = ($_POST["label"]!=$langs->trans('RequiredField')?$_POST["label"]:'');
|
|
||||||
$object->name = ($_POST["name"]!=$langs->trans('RequiredField')?$_POST["name"]:'');
|
|
||||||
$object->address = $_POST["address"];
|
|
||||||
$object->zip = $_POST["zipcode"];
|
|
||||||
$object->town = $_POST["town"];
|
|
||||||
$object->country_id = $_POST["country_id"];
|
|
||||||
$object->phone = $_POST["phone"];
|
|
||||||
$object->fax = $_POST["fax"];
|
|
||||||
$object->note = $_POST["note"];
|
|
||||||
|
|
||||||
// Add new address
|
|
||||||
if ($action == 'add')
|
|
||||||
{
|
|
||||||
$result = $object->create($socid, $user);
|
|
||||||
|
|
||||||
if ($result >= 0)
|
|
||||||
{
|
|
||||||
if (! empty($backtopage))
|
|
||||||
{
|
|
||||||
header("Location: ".$backtopage);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif ($origin == 'commande')
|
|
||||||
{
|
|
||||||
header("Location: ../commande/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif ($origin == 'propal')
|
|
||||||
{
|
|
||||||
header("Location: ../comm/propal/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif ($origin == 'shipment')
|
|
||||||
{
|
|
||||||
header("Location: ../expedition/card.php?id=".$originid);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
$action='create';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update address
|
|
||||||
elseif ($action == 'update')
|
|
||||||
{
|
|
||||||
$result = $object->update($id, $socid, $user);
|
|
||||||
|
|
||||||
if ($result >= 0)
|
|
||||||
{
|
|
||||||
if (! empty($backtopage))
|
|
||||||
{
|
|
||||||
header("Location: ".$backtopage);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif ($origin == 'commande')
|
|
||||||
{
|
|
||||||
header("Location: ../commande/contact.php?id=".$originid);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif ($origin == 'propal')
|
|
||||||
{
|
|
||||||
header("Location: ../comm/propal/contact.php?id=".$originid);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
elseif ($origin == 'shipment')
|
|
||||||
{
|
|
||||||
header("Location: ../expedition/card.php?id=".$originid);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$reload = 0;
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
$action= "edit";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer)
|
|
||||||
{
|
|
||||||
$result = $object->delete($id, $socid);
|
|
||||||
|
|
||||||
if ($result == 0)
|
|
||||||
{
|
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid);
|
|
||||||
exit ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$reload = 0;
|
|
||||||
$action='';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
$form = new Form($db);
|
|
||||||
$formcompany = new FormCompany($db);
|
|
||||||
$countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
|
|
||||||
|
|
||||||
if ($action == 'create')
|
|
||||||
{
|
|
||||||
if ($user->rights->societe->creer)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Creation
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($_POST["label"] && $_POST["name"])
|
|
||||||
{
|
|
||||||
$object->socid = $socid;
|
|
||||||
$object->label = $_POST["label"];
|
|
||||||
$object->name = $_POST["name"];
|
|
||||||
$object->address = $_POST["address"];
|
|
||||||
$object->zip = $_POST["zipcode"];
|
|
||||||
$object->town = $_POST["town"];
|
|
||||||
$object->phone = $_POST["phone"];
|
|
||||||
$object->fax = $_POST["fax"];
|
|
||||||
$object->note = $_POST["note"];
|
|
||||||
}
|
|
||||||
|
|
||||||
// On positionne country_id, country_code and label of the chosen country
|
|
||||||
$object->country_id = (GETPOST('country_id', 'int') ? GETPOST('country_id', 'int') : $mysoc->country_id);
|
|
||||||
if ($object->country_id)
|
|
||||||
{
|
|
||||||
$tmparray=getCountry($object->country_id, 'all');
|
|
||||||
$object->country_code = $tmparray['code'];
|
|
||||||
$object->country = $tmparray['label'];
|
|
||||||
}
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("AddAddress"));
|
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
// If javascript enabled, we add interactivity on mandatory fields
|
|
||||||
if ($conf->use_javascript_ajax)
|
|
||||||
{
|
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
|
||||||
print '$(document).ready(function () {
|
|
||||||
$("#label").focus(function() {
|
|
||||||
hideMessage("label","'.$langs->trans('RequiredField').'");
|
|
||||||
});
|
|
||||||
$("#label").blur(function() {
|
|
||||||
displayMessage("label","'.$langs->trans('RequiredField').'");
|
|
||||||
});
|
|
||||||
$("#name").focus(function() {
|
|
||||||
hideMessage("name","'.$langs->trans('RequiredField').'");
|
|
||||||
});
|
|
||||||
$("#name").blur(function() {
|
|
||||||
displayMessage("name","'.$langs->trans('RequiredField').'");
|
|
||||||
});
|
|
||||||
displayMessage("label","'.$langs->trans('RequiredField').'");
|
|
||||||
displayMessage("name","'.$langs->trans('RequiredField').'");
|
|
||||||
$("#label").css("color","grey");
|
|
||||||
$("#name").css("color","grey");
|
|
||||||
})';
|
|
||||||
print '</script>'."\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="formsoc">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'"/>';
|
|
||||||
print '<input type="hidden" name="socid" value="'.$socid.'"/>';
|
|
||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'"/>';
|
|
||||||
print '<input type="hidden" name="origin" value="'.$origin.'"/>';
|
|
||||||
print '<input type="hidden" name="originid" value="'.$originid.'"/>';
|
|
||||||
print '<input type="hidden" name="action" value="add"/>';
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td><td><input type="text" size="30" name="label" id="label" value="'.($object->label?$object->label:$langs->trans('RequiredField')).'"></td></tr>';
|
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans('Name').'</td><td><input type="text" size="30" name="name" id="name" value="'.($object->name?$object->name:$langs->trans('RequiredField')).'"></td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td class="tdtop">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
|
|
||||||
print $object->address;
|
|
||||||
print '</textarea></td></tr>';
|
|
||||||
|
|
||||||
// Zip
|
|
||||||
print '<tr><td>'.$langs->trans('Zip').'</td><td>';
|
|
||||||
print $formcompany->select_ziptown($object->zip, 'zipcode', array('town','selectcountry_id'), 6);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Town
|
|
||||||
print '<tr><td>'.$langs->trans('Town').'</td><td>';
|
|
||||||
print $formcompany->select_ziptown($object->town, 'town', array('zipcode','selectcountry_id'));
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">';
|
|
||||||
print $form->select_country($object->country_id, 'selectcountry_id');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Note').'</td><td colspan="3"><textarea name="note" cols="40" rows="6" wrap="soft">';
|
|
||||||
print $object->note;
|
|
||||||
print '</textarea></td></tr>';
|
|
||||||
|
|
||||||
print '</table>'."\n";
|
|
||||||
|
|
||||||
print '<br><div class="center">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Add').'">';
|
|
||||||
if (! empty($backtopage))
|
|
||||||
{
|
|
||||||
print ' ';
|
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
|
||||||
}
|
|
||||||
print '</div>'."\n";
|
|
||||||
|
|
||||||
print '</form>'."\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ($action == 'edit')
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Fiche societe en mode edition
|
|
||||||
*/
|
|
||||||
|
|
||||||
$societe=new Societe($db);
|
|
||||||
$societe->fetch($socid);
|
|
||||||
$head = societe_prepare_head($societe);
|
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $societe->name);
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("EditAddress"));
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
if ($socid)
|
|
||||||
{
|
|
||||||
if ($reload || ! $_POST["name"])
|
|
||||||
{
|
|
||||||
$object->socid = $socid;
|
|
||||||
$object->fetch_address($id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$object->id = $id;
|
|
||||||
$object->socid = $socid;
|
|
||||||
$object->label = $_POST["label"];
|
|
||||||
$object->name = $_POST["name"];
|
|
||||||
$object->address = $_POST["address"];
|
|
||||||
$object->zip = $_POST["zipcode"];
|
|
||||||
$object->town = $_POST["town"];
|
|
||||||
$object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
|
|
||||||
$object->phone = $_POST["phone"];
|
|
||||||
$object->fax = $_POST["fax"];
|
|
||||||
$object->note = $_POST["note"];
|
|
||||||
|
|
||||||
// On positionne country_id, country_code and label of the chosen country
|
|
||||||
if ($object->country_id)
|
|
||||||
{
|
|
||||||
$tmparray=getCountry($object->country_id, 'all');
|
|
||||||
$object->country_code = $tmparray['code'];
|
|
||||||
$object->country = $tmparray['label'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'" method="POST" name="formsoc">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'"/>';
|
|
||||||
print '<input type="hidden" name="action" value="update"/>';
|
|
||||||
print '<input type="hidden" name="socid" value="'.$object->socid.'"/>';
|
|
||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'"/>';
|
|
||||||
print '<input type="hidden" name="origin" value="'.$origin.'"/>';
|
|
||||||
print '<input type="hidden" name="originid" value="'.$originid.'"/>';
|
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'"/>';
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('AddressLabel').'</td><td colspan="3"><input type="text" size="40" name="label" value="'.$object->label.'"></td></tr>';
|
|
||||||
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="name" value="'.$object->name.'"></td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td class="tdtop">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
|
|
||||||
print $object->address;
|
|
||||||
print '</textarea></td></tr>';
|
|
||||||
|
|
||||||
// Zip
|
|
||||||
print '<tr><td>'.$langs->trans('Zip').'</td><td>';
|
|
||||||
print $formcompany->select_ziptown($object->zip, 'zipcode', array('town','selectcountry_id'), 6);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Town
|
|
||||||
print '<tr><td>'.$langs->trans('Town').'</td><td>';
|
|
||||||
print $formcompany->select_ziptown($object->town, 'town', array('zipcode','selectcountry_id'));
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
|
||||||
print $form->select_country($object->country_id, 'country_id');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Note').'</td><td colspan="3"><textarea name="note" cols="40" rows="6" wrap="soft">';
|
|
||||||
print $object->note;
|
|
||||||
print '</textarea></td></tr>';
|
|
||||||
|
|
||||||
print '</table><br>';
|
|
||||||
|
|
||||||
print '<div class="center">';
|
|
||||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
|
||||||
print ' ';
|
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Fiche societe en mode visu
|
|
||||||
*/
|
|
||||||
|
|
||||||
$result=$object->fetch_lines($socid);
|
|
||||||
if ($result < 0)
|
|
||||||
{
|
|
||||||
dol_print_error($db, $object->error);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$societe=new Societe($db);
|
|
||||||
$societe->fetch($object->socid);
|
|
||||||
$head = societe_prepare_head($societe);
|
|
||||||
|
|
||||||
dol_fiche_head($head, 'customer', $societe->name);
|
|
||||||
|
|
||||||
|
|
||||||
// Confirmation delete
|
|
||||||
if ($action == 'delete')
|
|
||||||
{
|
|
||||||
print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id, $langs->trans("DeleteAddress"), $langs->trans("ConfirmDeleteAddress"), "confirm_delete");
|
|
||||||
}
|
|
||||||
|
|
||||||
$nblines = count($object->lines);
|
|
||||||
if ($nblines)
|
|
||||||
{
|
|
||||||
for ($i = 0 ; $i < $nblines ; $i++)
|
|
||||||
{
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
print '<tr><td width="20%">'.$langs->trans('AddressLabel').'</td><td colspan="3">'.$object->lines[$i]->label.'</td>';
|
|
||||||
print '<td valign="top" colspan="2" width="50%" rowspan="6">'.$langs->trans('Note').' :<br>'.nl2br($object->lines[$i]->note).'</td></tr>';
|
|
||||||
print '<tr><td width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$object->lines[$i]->name.'</td></tr>';
|
|
||||||
|
|
||||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($object->lines[$i]->address)."</td></tr>";
|
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$object->lines[$i]->zip."</td></tr>";
|
|
||||||
print '<tr><td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$object->lines[$i]->town."</td></tr>";
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$object->lines[$i]->country.'</td>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($object->lines[$i]->phone, $object->lines[$i]->country_code, 0, $object->socid, 'AC_TEL').'</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($object->lines[$i]->fax, $object->lines[$i]->country_code, 0, $object->socid, 'AC_FAX').'</td></tr>';
|
|
||||||
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
|
|
||||||
if ($user->rights->societe->creer)
|
|
||||||
{
|
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&id='.$object->lines[$i]->id.'&action=edit">'.$langs->trans("Modify").'</a></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->societe->supprimer)
|
|
||||||
{
|
|
||||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&id='.$object->lines[$i]->id.'&action=delete">'.$langs->trans("Delete").'</a></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
print '<br>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $langs->trans("None");
|
|
||||||
}
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Bouton actions
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($action == '')
|
|
||||||
{
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
|
|
||||||
if ($user->rights->societe->creer)
|
|
||||||
{
|
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&action=create">'.$langs->trans("Add").'</a></div>';
|
|
||||||
}
|
|
||||||
print '</div>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
|
||||||
llxFooter();
|
|
||||||
$db->close();
|
|
||||||
@@ -7,8 +7,9 @@
|
|||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 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
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
@@ -1327,12 +1328,6 @@ if ($object->id > 0)
|
|||||||
show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
|
show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Addresses list
|
|
||||||
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
|
|
||||||
{
|
|
||||||
show_addresses($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||||
{
|
{
|
||||||
print load_fiche_titre($langs->trans("ActionsOnCompany"), '', '');
|
print load_fiche_titre($langs->trans("ActionsOnCompany"), '', '');
|
||||||
|
|||||||
@@ -423,12 +423,15 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) {
|
||||||
|
$error++;
|
||||||
|
$this->errors[]="Error ".$this->db->lasterror();
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
//if (! $error)
|
||||||
{
|
//{
|
||||||
if (! $notrigger)
|
// if (! $notrigger)
|
||||||
{
|
// {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// want this action calls a trigger.
|
||||||
|
|
||||||
@@ -438,8 +441,8 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
||||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
//// End call triggers
|
//// End call triggers
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error)
|
if ($error)
|
||||||
@@ -790,15 +793,15 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
if (!empty($arrayquery['options_'.$key.'_end_dt'.'_cnct'])){
|
if (!empty($arrayquery['options_'.$key.'_end_dt'.'_cnct'])){
|
||||||
$sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'.'_cnct'])."')";
|
$sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'.'_cnct'])."')";
|
||||||
}
|
}
|
||||||
}elseif ($extrafields->attribute_type[$key] == 'boolean') {
|
} elseif ($extrafields->attribute_type[$key] == 'boolean') {
|
||||||
if ($arrayquery['options_'.$key.'_cnct']!=''){
|
if ($arrayquery['options_'.$key.'_cnct']!=''){
|
||||||
if ($arrayquery['options_'.$key.'_cnct']==0) {
|
if ($arrayquery['options_'.$key.'_cnct']==0) {
|
||||||
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key.'_cnct']." OR ((te.".$key." IS NULL) AND (te.fk_object IS NOT NULL)))";
|
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key.'_cnct']." OR ((te.".$key." IS NULL) AND (te.fk_object IS NOT NULL)))";
|
||||||
}else {
|
} else {
|
||||||
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key.'_cnct'].")";
|
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key.'_cnct'].")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if (is_array($arrayquery['options_'.$key.'_cnct'])) {
|
if (is_array($arrayquery['options_'.$key.'_cnct'])) {
|
||||||
$sqlwhere[]= " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key.'_cnct'])."'))";
|
$sqlwhere[]= " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key.'_cnct'])."'))";
|
||||||
} elseif (!empty($arrayquery['options_'.$key.'_cnct'])) {
|
} elseif (!empty($arrayquery['options_'.$key.'_cnct'])) {
|
||||||
@@ -965,12 +968,12 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (count($return_sql_like)>0) {
|
if (count($return_sql_like)>0) {
|
||||||
$return_sql_criteria .= '(' . implode (' OR ', $return_sql_like) .')';
|
$return_sql_criteria .= '(' . implode(' OR ', $return_sql_like) .')';
|
||||||
}
|
}
|
||||||
if (count($return_sql_not_like)>0) {
|
if (count($return_sql_not_like)>0) {
|
||||||
$return_sql_criteria .= ' AND (' . implode (' AND ', $return_sql_not_like).')';
|
$return_sql_criteria .= ' AND (' . implode(' AND ', $return_sql_not_like).')';
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
$return_sql_criteria .= $column_to_test . ' LIKE \''.$this->db->escape($criteria).'\'';
|
$return_sql_criteria .= $column_to_test . ' LIKE \''.$this->db->escape($criteria).'\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
/* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -64,7 +65,7 @@ class FormAdvTargetEmailing extends Form
|
|||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_prospectlevel";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "c_prospectlevel";
|
||||||
$sql .= " WHERE active > 0";
|
$sql .= " WHERE active > 0";
|
||||||
$sql .= " ORDER BY sortorder";
|
$sql .= " ORDER BY sortorder";
|
||||||
dol_syslog (get_class($this) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG);
|
dol_syslog(get_class($this) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
@@ -120,10 +121,10 @@ class FormAdvTargetEmailing extends Form
|
|||||||
$foundselected = false;
|
$foundselected = false;
|
||||||
|
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$obj = $this->db->fetch_object ($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
$countryArray [$i] ['rowid'] = $obj->rowid;
|
$countryArray [$i] ['rowid'] = $obj->rowid;
|
||||||
$countryArray [$i] ['code_iso'] = $obj->code_iso;
|
$countryArray [$i] ['code_iso'] = $obj->code_iso;
|
||||||
$countryArray [$i] ['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country" . $obj->code_iso) != "Country" . $obj->code_iso ? $langs->transnoentitiesnoconv ("Country" . $obj->code_iso) : ($obj->label != '-' ? $obj->label : ''));
|
$countryArray [$i] ['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country" . $obj->code_iso) != "Country" . $obj->code_iso ? $langs->transnoentitiesnoconv("Country" . $obj->code_iso) : ($obj->label != '-' ? $obj->label : ''));
|
||||||
$label[$i] = $countryArray[$i]['label'];
|
$label[$i] = $countryArray[$i]['label'];
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
@@ -166,25 +167,25 @@ class FormAdvTargetEmailing extends Form
|
|||||||
$sql_usr .= " WHERE u2.entity IN (0," . $conf->entity . ")";
|
$sql_usr .= " WHERE u2.entity IN (0," . $conf->entity . ")";
|
||||||
$sql_usr .= " AND u2.rowid = sc.fk_user ";
|
$sql_usr .= " AND u2.rowid = sc.fk_user ";
|
||||||
|
|
||||||
if (! empty ($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX))
|
if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX))
|
||||||
$sql_usr .= " AND u2.statut<>0 ";
|
$sql_usr .= " AND u2.statut<>0 ";
|
||||||
$sql_usr .= " ORDER BY name ASC";
|
$sql_usr .= " ORDER BY name ASC";
|
||||||
// print $sql_usr;exit;
|
// print $sql_usr;exit;
|
||||||
|
|
||||||
$resql_usr = $this->db->query ($sql_usr);
|
$resql_usr = $this->db->query($sql_usr);
|
||||||
if ($resql_usr) {
|
if ($resql_usr) {
|
||||||
while ( $obj_usr = $this->db->fetch_object ($resql_usr) ) {
|
while ( $obj_usr = $this->db->fetch_object($resql_usr) ) {
|
||||||
|
|
||||||
$label = $obj_usr->firstname . " " . $obj_usr->name . " (" . $obj_usr->login . ')';
|
$label = $obj_usr->firstname . " " . $obj_usr->name . " (" . $obj_usr->login . ')';
|
||||||
|
|
||||||
$options_array [$obj_usr->rowid] = $label;
|
$options_array [$obj_usr->rowid] = $label;
|
||||||
}
|
}
|
||||||
$this->db->free ($resql_usr);
|
$this->db->free($resql_usr);
|
||||||
} else {
|
} else {
|
||||||
dol_print_error ($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->advMultiselectarray ($htmlname, $options_array, $selected_array);
|
return $this->advMultiselectarray($htmlname, $options_array, $selected_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -227,8 +228,8 @@ class FormAdvTargetEmailing extends Form
|
|||||||
|
|
||||||
if (is_array($sqlqueryparam))
|
if (is_array($sqlqueryparam))
|
||||||
{
|
{
|
||||||
$param_list = array_keys ($sqlqueryparam);
|
$param_list = array_keys($sqlqueryparam);
|
||||||
$InfoFieldList = explode (":", $param_list [0]);
|
$InfoFieldList = explode(":", $param_list [0]);
|
||||||
|
|
||||||
// 0 1 : tableName
|
// 0 1 : tableName
|
||||||
// 1 2 : label field name Nom du champ contenant le libelle
|
// 1 2 : label field name Nom du champ contenant le libelle
|
||||||
@@ -237,8 +238,8 @@ class FormAdvTargetEmailing extends Form
|
|||||||
|
|
||||||
$keyList = 'rowid';
|
$keyList = 'rowid';
|
||||||
|
|
||||||
if (count ($InfoFieldList) >= 3) {
|
if (count($InfoFieldList) >= 3) {
|
||||||
if (strpos ($InfoFieldList [3], 'extra.') !== false) {
|
if (strpos($InfoFieldList [3], 'extra.') !== false) {
|
||||||
$keyList = 'main.' . $InfoFieldList [2] . ' as rowid';
|
$keyList = 'main.' . $InfoFieldList [2] . ' as rowid';
|
||||||
} else {
|
} else {
|
||||||
$keyList = $InfoFieldList [2] . ' as rowid';
|
$keyList = $InfoFieldList [2] . ' as rowid';
|
||||||
@@ -247,10 +248,10 @@ class FormAdvTargetEmailing extends Form
|
|||||||
|
|
||||||
$sql = 'SELECT ' . $keyList . ', ' . $InfoFieldList [1];
|
$sql = 'SELECT ' . $keyList . ', ' . $InfoFieldList [1];
|
||||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList [0];
|
$sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList [0];
|
||||||
if (! empty ($InfoFieldList [3])) {
|
if (! empty($InfoFieldList [3])) {
|
||||||
|
|
||||||
// We have to join on extrafield table
|
// We have to join on extrafield table
|
||||||
if (strpos ($InfoFieldList [3], 'extra') !== false) {
|
if (strpos($InfoFieldList [3], 'extra') !== false) {
|
||||||
$sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList [0] . '_extrafields as extra';
|
$sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList [0] . '_extrafields as extra';
|
||||||
$sql .= ' WHERE extra.fk_object=main.' . $InfoFieldList [2] . ' AND ' . $InfoFieldList [3];
|
$sql .= ' WHERE extra.fk_object=main.' . $InfoFieldList [2] . ' AND ' . $InfoFieldList [3];
|
||||||
} else {
|
} else {
|
||||||
@@ -270,13 +271,13 @@ class FormAdvTargetEmailing extends Form
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num) {
|
if ($num) {
|
||||||
while ( $i < $num ) {
|
while ( $i < $num ) {
|
||||||
$obj = $this->db->fetch_object ($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
$labeltoshow = dol_trunc ($obj->$InfoFieldList [1], 90);
|
$labeltoshow = dol_trunc($obj->$InfoFieldList [1], 90);
|
||||||
$options_array[$obj->rowid]=$labeltoshow;
|
$options_array[$obj->rowid]=$labeltoshow;
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->db->free ($resql);
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,7 +329,7 @@ class FormAdvTargetEmailing extends Form
|
|||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->advMultiselectarray ($htmlname, $options_array, $selected_array);
|
return $this->advMultiselectarray($htmlname, $options_array, $selected_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -438,19 +439,19 @@ class FormAdvTargetEmailing extends Form
|
|||||||
$sql .= " WHERE type_element='$type_element'";
|
$sql .= " WHERE type_element='$type_element'";
|
||||||
$sql .= " ORDER BY c.name";
|
$sql .= " ORDER BY c.name";
|
||||||
|
|
||||||
dol_syslog (get_class ($this) . "::".__METHOD__, LOG_DEBUG);
|
dol_syslog(get_class($this) . "::".__METHOD__, LOG_DEBUG);
|
||||||
$resql = $this->db->query ($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
|
|
||||||
|
|
||||||
$out .= '<select id="' . $htmlname . '" class="flat" name="' . $htmlname . '">';
|
$out .= '<select id="' . $htmlname . '" class="flat" name="' . $htmlname . '">';
|
||||||
if ($showempty)
|
if ($showempty)
|
||||||
$out .= '<option value=""></option>';
|
$out .= '<option value=""></option>';
|
||||||
$num = $this->db->num_rows ($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num) {
|
if ($num) {
|
||||||
while ( $i < $num ) {
|
while ( $i < $num ) {
|
||||||
$obj = $this->db->fetch_object ($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
$label = $obj->name;
|
$label = $obj->name;
|
||||||
if (empty($label)) {
|
if (empty($label)) {
|
||||||
$label=$obj->fk_element;
|
$label=$obj->fk_element;
|
||||||
@@ -466,9 +467,9 @@ class FormAdvTargetEmailing extends Form
|
|||||||
}
|
}
|
||||||
$out .= '</select>';
|
$out .= '</select>';
|
||||||
} else {
|
} else {
|
||||||
dol_print_error ($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
$this->db->free ($resql);
|
$this->db->free($resql);
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,11 +58,12 @@ class Proposals extends DolibarrApi
|
|||||||
* Return an array with commercial proposal informations
|
* Return an array with commercial proposal informations
|
||||||
*
|
*
|
||||||
* @param int $id ID of commercial proposal
|
* @param int $id ID of commercial proposal
|
||||||
|
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id
|
||||||
* @return array|mixed data without useless information
|
* @return array|mixed data without useless information
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function get($id)
|
function get($id, $contact_list = 1)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->propal->lire) {
|
if(! DolibarrApiAccess::$user->rights->propal->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@@ -77,9 +78,8 @@ class Proposals extends DolibarrApi
|
|||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add external contacts ids
|
// Add external contacts ids.
|
||||||
$this->propal->contacts_ids = $this->propal->liste_contact(-1, 'external', 1);
|
$this->propal->contacts_ids = $this->propal->liste_contact(-1, 'external', $contact_list);
|
||||||
|
|
||||||
$this->propal->fetchObjectLinked();
|
$this->propal->fetchObjectLinked();
|
||||||
return $this->_cleanObjectDatas($this->propal);
|
return $this->_cleanObjectDatas($this->propal);
|
||||||
}
|
}
|
||||||
@@ -409,6 +409,86 @@ class Proposals extends DolibarrApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a contact type of given commercial proposal
|
||||||
|
*
|
||||||
|
* @param int $id Id of commercial proposal to update
|
||||||
|
* @param int $contactid Id of contact to add
|
||||||
|
* @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER)
|
||||||
|
*
|
||||||
|
* @url POST {id}/contact/{contactid}/{type}
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
* @throws 401
|
||||||
|
* @throws 404
|
||||||
|
*/
|
||||||
|
function postContact($id, $contactid, $type)
|
||||||
|
{
|
||||||
|
if(!DolibarrApiAccess::$user->rights->propal->creer) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->propal->fetch($id);
|
||||||
|
|
||||||
|
if(!$result) {
|
||||||
|
throw new RestException(404, 'Proposal not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($type, array('BILLING', 'SHIPPING', 'CUSTOMER'), true)) {
|
||||||
|
throw new RestException(500, 'Availables types: BILLING, SHIPPING OR CUSTOMER');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) {
|
||||||
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->propal->add_contact($contactid, $type, 'external');
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
throw new RestException(500, 'Error when added the contact');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->propal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a contact type of given commercial proposal
|
||||||
|
*
|
||||||
|
* @param int $id Id of commercial proposal to update
|
||||||
|
* @param int $rowid Row key of the contact in the array contact_ids.
|
||||||
|
*
|
||||||
|
* @url DELETE {id}/contact/{rowid}
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
* @throws 401
|
||||||
|
* @throws 404
|
||||||
|
* @throws 500
|
||||||
|
*/
|
||||||
|
function deleteContact($id, $rowid)
|
||||||
|
{
|
||||||
|
if(!DolibarrApiAccess::$user->rights->propal->creer) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->propal->fetch($id);
|
||||||
|
|
||||||
|
if(!$result) {
|
||||||
|
throw new RestException(404, 'Proposal not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) {
|
||||||
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->propal->delete_contact($rowid);
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
throw new RestException(500, 'Error when deleted the contact');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->propal;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update commercial proposal general fields (won't touch lines of commercial proposal)
|
* Update commercial proposal general fields (won't touch lines of commercial proposal)
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -411,7 +411,7 @@ if ($socid > 0)
|
|||||||
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
|
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
|
||||||
$sql.= " rc.datec as dc, rc.description,";
|
$sql.= " rc.datec as dc, rc.description,";
|
||||||
$sql.= " rc.fk_facture_source,";
|
$sql.= " rc.fk_facture_source,";
|
||||||
$sql.= " u.login, u.rowid as user_id,";
|
$sql.= " u.login, u.rowid as user_id,";
|
||||||
@@ -433,11 +433,19 @@ if ($socid > 0)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
||||||
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
|
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
|
||||||
print '<td width="150" class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
||||||
print '<td width="120" class="right">'.$langs->trans("AmountHT").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td width="80" class="right">'.$langs->trans("VATRate").'</td>';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
print '<td width="120" class="right">'.$langs->trans("AmountTTC").'</td>';
|
{
|
||||||
print '<td width="100" align="center">'.$langs->trans("DiscountOfferedBy").'</td>';
|
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
||||||
|
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
||||||
|
}
|
||||||
|
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -455,7 +463,7 @@ if ($socid > 0)
|
|||||||
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
|
||||||
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
|
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id=$obj->fk_facture_source;
|
$facturestatic->id=$obj->fk_facture_source;
|
||||||
$facturestatic->ref=$obj->ref;
|
$facturestatic->ref=$obj->ref;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
@@ -464,7 +472,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
|
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id=$obj->fk_facture_source;
|
$facturestatic->id=$obj->fk_facture_source;
|
||||||
$facturestatic->ref=$obj->ref;
|
$facturestatic->ref=$obj->ref;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
@@ -473,7 +481,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description))
|
elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id=$obj->fk_facture_source;
|
$facturestatic->id=$obj->fk_facture_source;
|
||||||
$facturestatic->ref=$obj->ref;
|
$facturestatic->ref=$obj->ref;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
@@ -482,14 +490,22 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td class="minwidth100">';
|
||||||
print $obj->description;
|
print $obj->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td class="nowrap">'.$langs->trans("NotConsumed").'</td>';
|
print '<td class="nowrap">'.$langs->trans("NotConsumed").'</td>';
|
||||||
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
||||||
print '<td class="right">'.price2num($obj->tva_tx, 'MU').'%</td>';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.price($obj->multicurrency_amount_ht).'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="right">'.vatrate($obj->tva_tx, true).'</td>';
|
||||||
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
||||||
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
|
||||||
|
}
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -497,7 +513,7 @@ if ($socid > 0)
|
|||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
|
||||||
print ' ';
|
//print ' ';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@@ -550,7 +566,7 @@ if ($socid > 0)
|
|||||||
/*
|
/*
|
||||||
* Liste remises fixes fournisseur restant en cours (= liees a aucune facture ni ligne de facture)
|
* Liste remises fixes fournisseur restant en cours (= liees a aucune facture ni ligne de facture)
|
||||||
*/
|
*/
|
||||||
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
|
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
|
||||||
$sql.= " rc.datec as dc, rc.description,";
|
$sql.= " rc.datec as dc, rc.description,";
|
||||||
$sql.= " rc.fk_invoice_supplier_source,";
|
$sql.= " rc.fk_invoice_supplier_source,";
|
||||||
$sql.= " u.login, u.rowid as user_id,";
|
$sql.= " u.login, u.rowid as user_id,";
|
||||||
@@ -572,11 +588,19 @@ if ($socid > 0)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
||||||
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
|
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
|
||||||
print '<td width="150" class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
||||||
print '<td width="120" class="right">'.$langs->trans("AmountHT").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td width="80" class="right">'.$langs->trans("VATRate").'</td>';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
print '<td width="120" class="right">'.$langs->trans("AmountTTC").'</td>';
|
{
|
||||||
print '<td width="100" align="center">'.$langs->trans("DiscountOfferedBy").'</td>';
|
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
||||||
|
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
||||||
|
}
|
||||||
|
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -594,7 +618,7 @@ if ($socid > 0)
|
|||||||
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
|
||||||
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
|
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref=$obj->ref;
|
$facturefournstatic->ref=$obj->ref;
|
||||||
$facturefournstatic->type=$obj->type;
|
$facturefournstatic->type=$obj->type;
|
||||||
@@ -603,7 +627,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
|
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref=$obj->ref;
|
$facturefournstatic->ref=$obj->ref;
|
||||||
$facturefournstatic->type=$obj->type;
|
$facturefournstatic->type=$obj->type;
|
||||||
@@ -612,7 +636,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/\(EXCESS PAID\)/', $obj->description))
|
elseif (preg_match('/\(EXCESS PAID\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref=$obj->ref;
|
$facturefournstatic->ref=$obj->ref;
|
||||||
$facturefournstatic->type=$obj->type;
|
$facturefournstatic->type=$obj->type;
|
||||||
@@ -621,22 +645,30 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td class="minwidth100">';
|
||||||
print $obj->description;
|
print $obj->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td class="nowrap">'.$langs->trans("NotConsumed").'</td>';
|
print '<td class="nowrap">'.$langs->trans("NotConsumed").'</td>';
|
||||||
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
||||||
print '<td class="right">'.price2num($obj->tva_tx, 'MU').'%</td>';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.price($obj->multicurrency_amount_ht).'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="right">'.vatrate($obj->tva_tx, true).'</td>';
|
||||||
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
||||||
print '<td align="center">';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="center">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($user->rights->societe->creer || $user->rights->facture->creer)
|
if ($user->rights->societe->creer || $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="center nowrap">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
|
||||||
print ' ';
|
//print ' ';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@@ -700,7 +732,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remises liees a lignes de factures
|
// Remises liees a lignes de factures
|
||||||
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
|
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
|
||||||
$sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
|
$sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
|
||||||
$sql.= " rc.fk_facture_source,";
|
$sql.= " rc.fk_facture_source,";
|
||||||
$sql.= " u.login, u.rowid as user_id,";
|
$sql.= " u.login, u.rowid as user_id,";
|
||||||
@@ -745,11 +777,19 @@ if ($socid > 0)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
||||||
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
|
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
|
||||||
print '<td width="150" class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
||||||
print '<td width="120" class="right">'.$langs->trans("AmountHT").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td width="80" class="right">'.$langs->trans("VATRate").'</td>';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
print '<td width="120" class="right">'.$langs->trans("AmountTTC").'</td>';
|
{
|
||||||
print '<td width="100" align="center">'.$langs->trans("Author").'</td>';
|
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
||||||
|
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
||||||
|
}
|
||||||
|
print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -788,7 +828,7 @@ if ($socid > 0)
|
|||||||
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
|
||||||
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
|
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id=$obj->fk_facture_source;
|
$facturestatic->id=$obj->fk_facture_source;
|
||||||
$facturestatic->ref=$obj->ref;
|
$facturestatic->ref=$obj->ref;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
@@ -797,7 +837,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
|
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id=$obj->fk_facture_source;
|
$facturestatic->id=$obj->fk_facture_source;
|
||||||
$facturestatic->ref=$obj->ref;
|
$facturestatic->ref=$obj->ref;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
@@ -806,7 +846,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description))
|
elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturestatic->id=$obj->fk_facture_source;
|
$facturestatic->id=$obj->fk_facture_source;
|
||||||
$facturestatic->ref=$obj->ref;
|
$facturestatic->ref=$obj->ref;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
@@ -815,15 +855,23 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td class="minwidth100">';
|
||||||
print $obj->description;
|
print $obj->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
|
print '<td class="left nowrap"><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
|
||||||
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
||||||
print '<td class="right">'.price2num($obj->tva_tx, 'MU').'%</td>';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.price($obj->multicurrency_amount_ht).'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="right">'.vatrate($obj->tva_tx, true).'</td>';
|
||||||
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
||||||
print '<td align="center">';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="center">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
@@ -854,7 +902,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remises liees a lignes de factures
|
// Remises liees a lignes de factures
|
||||||
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
|
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
|
||||||
$sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
|
$sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
|
||||||
$sql.= " rc.fk_invoice_supplier_source,";
|
$sql.= " rc.fk_invoice_supplier_source,";
|
||||||
$sql.= " u.login, u.rowid as user_id,";
|
$sql.= " u.login, u.rowid as user_id,";
|
||||||
@@ -899,11 +947,19 @@ if ($socid > 0)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
|
||||||
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
|
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
|
||||||
print '<td width="150" class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
|
||||||
print '<td width="120" class="right">'.$langs->trans("AmountHT").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td width="80" class="right">'.$langs->trans("VATRate").'</td>';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
print '<td width="120" class="right">'.$langs->trans("AmountTTC").'</td>';
|
{
|
||||||
print '<td width="100" align="center">'.$langs->trans("Author").'</td>';
|
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="right">'.$langs->trans("VATRate").'</td>';
|
||||||
|
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
|
||||||
|
}
|
||||||
|
print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -942,7 +998,7 @@ if ($socid > 0)
|
|||||||
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
|
||||||
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
|
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref=$obj->ref;
|
$facturefournstatic->ref=$obj->ref;
|
||||||
$facturefournstatic->type=$obj->type;
|
$facturefournstatic->type=$obj->type;
|
||||||
@@ -951,7 +1007,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
|
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref=$obj->ref;
|
$facturefournstatic->ref=$obj->ref;
|
||||||
$facturefournstatic->type=$obj->type;
|
$facturefournstatic->type=$obj->type;
|
||||||
@@ -960,7 +1016,7 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/\(EXCESS PAID\)/', $obj->description))
|
elseif (preg_match('/\(EXCESS PAID\)/', $obj->description))
|
||||||
{
|
{
|
||||||
print '<td class="nowrap">';
|
print '<td class="minwidth100">';
|
||||||
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
|
||||||
$facturefournstatic->ref=$obj->ref;
|
$facturefournstatic->ref=$obj->ref;
|
||||||
$facturefournstatic->type=$obj->type;
|
$facturefournstatic->type=$obj->type;
|
||||||
@@ -969,14 +1025,22 @@ if ($socid > 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td class="minwidth100">';
|
||||||
print $obj->description;
|
print $obj->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
|
print '<td class="left nowrap"><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
|
||||||
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
print '<td class="right">'.price($obj->amount_ht).'</td>';
|
||||||
print '<td class="right">'.price2num($obj->tva_tx, 'MU').'%</td>';
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.price($obj->multicurrency_amount_ht).'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="right">'.vatrate($obj->tva_tx, true).'</td>';
|
||||||
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
||||||
|
if (! empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
|
||||||
|
}
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@@ -57,11 +57,12 @@ class Orders extends DolibarrApi
|
|||||||
* Return an array with order informations
|
* Return an array with order informations
|
||||||
*
|
*
|
||||||
* @param int $id ID of order
|
* @param int $id ID of order
|
||||||
|
* @param int $contact_list 0: Returned array of contacts/addresses contains all properties, 1: Return array contains just id
|
||||||
* @return array|mixed data without useless information
|
* @return array|mixed data without useless information
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function get($id)
|
function get($id, $contact_list = 1)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->commande->lire) {
|
if(! DolibarrApiAccess::$user->rights->commande->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@@ -77,7 +78,7 @@ class Orders extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add external contacts ids
|
// Add external contacts ids
|
||||||
$this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', 1);
|
$this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', $contact_list);
|
||||||
$this->commande->fetchObjectLinked();
|
$this->commande->fetchObjectLinked();
|
||||||
return $this->_cleanObjectDatas($this->commande);
|
return $this->_cleanObjectDatas($this->commande);
|
||||||
}
|
}
|
||||||
@@ -399,6 +400,86 @@ class Orders extends DolibarrApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a contact type of given order
|
||||||
|
*
|
||||||
|
* @param int $id Id of order to update
|
||||||
|
* @param int $contactid Id of contact to add
|
||||||
|
* @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER)
|
||||||
|
*
|
||||||
|
* @url POST {id}/contact/{contactid}/{type}
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
* @throws 401
|
||||||
|
* @throws 404
|
||||||
|
*/
|
||||||
|
function postContact($id, $contactid, $type)
|
||||||
|
{
|
||||||
|
if(!DolibarrApiAccess::$user->rights->commande->creer) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->commande->fetch($id);
|
||||||
|
|
||||||
|
if(!$result) {
|
||||||
|
throw new RestException(404, 'Order not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($type, array('BILLING', 'SHIPPING', 'CUSTOMER'), true)) {
|
||||||
|
throw new RestException(500, 'Availables types: BILLING, SHIPPING OR CUSTOMER');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!DolibarrApi::_checkAccessToResource('order', $this->commande->id)) {
|
||||||
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->commande->add_contact($contactid, $type, 'external');
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
throw new RestException(500, 'Error when added the contact');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->commande;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a contact type of given order
|
||||||
|
*
|
||||||
|
* @param int $id Id of order to update
|
||||||
|
* @param int $rowid Row key of the contact in the array contact_ids.
|
||||||
|
*
|
||||||
|
* @url DELETE {id}/contact/{rowid}
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
* @throws 401
|
||||||
|
* @throws 404
|
||||||
|
* @throws 500
|
||||||
|
*/
|
||||||
|
function deleteContact($id, $rowid)
|
||||||
|
{
|
||||||
|
if(!DolibarrApiAccess::$user->rights->commande->creer) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->commande->fetch($id);
|
||||||
|
|
||||||
|
if(!$result) {
|
||||||
|
throw new RestException(404, 'Order not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!DolibarrApi::_checkAccessToResource('order', $this->commande->id)) {
|
||||||
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->commande->delete_contact($rowid);
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
throw new RestException(500, 'Error when deleted the contact');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->commande;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update order general fields (won't touch lines of order)
|
* Update order general fields (won't touch lines of order)
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -204,6 +204,11 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
public $oldcopy;
|
public $oldcopy;
|
||||||
|
|
||||||
|
//! key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...)
|
||||||
|
public $module_source;
|
||||||
|
//! key of pos source ('0', '1', ...)
|
||||||
|
public $pos_source;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ERR Not enough stock
|
* ERR Not enough stock
|
||||||
*/
|
*/
|
||||||
@@ -820,7 +825,7 @@ class Commande extends CommonOrder
|
|||||||
$sql.= ", fk_warehouse";
|
$sql.= ", fk_warehouse";
|
||||||
$sql.= ", remise_absolue, remise_percent";
|
$sql.= ", remise_absolue, remise_percent";
|
||||||
$sql.= ", fk_incoterms, location_incoterms";
|
$sql.= ", fk_incoterms, location_incoterms";
|
||||||
$sql.= ", entity";
|
$sql.= ", entity, module_source, pos_source";
|
||||||
$sql.= ", fk_multicurrency";
|
$sql.= ", fk_multicurrency";
|
||||||
$sql.= ", multicurrency_code";
|
$sql.= ", multicurrency_code";
|
||||||
$sql.= ", multicurrency_tx";
|
$sql.= ", multicurrency_tx";
|
||||||
@@ -849,6 +854,8 @@ class Commande extends CommonOrder
|
|||||||
$sql.= ", ".(int) $this->fk_incoterms;
|
$sql.= ", ".(int) $this->fk_incoterms;
|
||||||
$sql.= ", '".$this->db->escape($this->location_incoterms)."'";
|
$sql.= ", '".$this->db->escape($this->location_incoterms)."'";
|
||||||
$sql.= ", ".$conf->entity;
|
$sql.= ", ".$conf->entity;
|
||||||
|
$sql.= ", ".($this->module_source ? "'".$this->db->escape($this->module_source)."'" : "null");
|
||||||
|
$sql.= ", ".($this->pos_source != '' ? "'".$this->db->escape($this->pos_source)."'" : "null");
|
||||||
$sql.= ", ".(int) $this->fk_multicurrency;
|
$sql.= ", ".(int) $this->fk_multicurrency;
|
||||||
$sql.= ", '".$this->db->escape($this->multicurrency_code)."'";
|
$sql.= ", '".$this->db->escape($this->multicurrency_code)."'";
|
||||||
$sql.= ", ".(double) $this->multicurrency_tx;
|
$sql.= ", ".(double) $this->multicurrency_tx;
|
||||||
@@ -1633,6 +1640,7 @@ class Commande extends CommonOrder
|
|||||||
$sql.= ', c.note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.last_main_doc, c.fk_delivery_address, c.extraparams';
|
$sql.= ', c.note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.last_main_doc, c.fk_delivery_address, c.extraparams';
|
||||||
$sql.= ', c.fk_incoterms, c.location_incoterms';
|
$sql.= ', c.fk_incoterms, c.location_incoterms';
|
||||||
$sql.= ", c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc";
|
$sql.= ", c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc";
|
||||||
|
$sql.= ", c.module_source, c.pos_source";
|
||||||
$sql.= ", i.libelle as libelle_incoterms";
|
$sql.= ", i.libelle as libelle_incoterms";
|
||||||
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
||||||
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
|
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
|
||||||
@@ -1709,6 +1717,8 @@ class Commande extends CommonOrder
|
|||||||
$this->shipping_method_id = ($obj->fk_shipping_method>0)?$obj->fk_shipping_method:null;
|
$this->shipping_method_id = ($obj->fk_shipping_method>0)?$obj->fk_shipping_method:null;
|
||||||
$this->warehouse_id = ($obj->fk_warehouse>0)?$obj->fk_warehouse:null;
|
$this->warehouse_id = ($obj->fk_warehouse>0)?$obj->fk_warehouse:null;
|
||||||
$this->fk_delivery_address = $obj->fk_delivery_address;
|
$this->fk_delivery_address = $obj->fk_delivery_address;
|
||||||
|
$this->module_source = $obj->module_source;
|
||||||
|
$this->pos_source = $obj->pos_source;
|
||||||
|
|
||||||
//Incoterms
|
//Incoterms
|
||||||
$this->fk_incoterms = $obj->fk_incoterms;
|
$this->fk_incoterms = $obj->fk_incoterms;
|
||||||
|
|||||||
@@ -727,24 +727,24 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
if (! empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'], $_SERVER["PHP_SELF"], 'c.date_commande', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'], $_SERVER["PHP_SELF"], 'c.date_commande', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'], $_SERVER["PHP_SELF"], 'c.date_livraison', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'], $_SERVER["PHP_SELF"], 'c.date_livraison', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'], $_SERVER["PHP_SELF"], 'c.total_ht', '', $param, 'class="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'], $_SERVER["PHP_SELF"], 'c.total_ht', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'], $_SERVER["PHP_SELF"], 'c.tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'], $_SERVER["PHP_SELF"], 'c.tva', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'], $_SERVER["PHP_SELF"], 'c.total_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'], $_SERVER["PHP_SELF"], 'c.total_ttc', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.date_creation", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, 'align="center"', $sortfield, $sortorder, '');
|
if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center ');
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
$total=0;
|
$total=0;
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ if ($action != 'edit')
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td> </td><td><input name="label" type="text" size="45"></td>';
|
print '<td> </td><td><input name="label" type="text" size="45"></td>';
|
||||||
print '<td align="center"><input type="submit" name="add" class="button" value="'.$langs->trans("Add").'"></td>';
|
print '<td class="center"><input type="submit" name="add" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -832,12 +832,12 @@ if ($mode == 'standard')
|
|||||||
$link="<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"]!='all'?'':'&option=all')."&year=".$prevyear."&month=".$prevmonth."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Month")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".$nextyear."&month=".$nextmonth."'>".img_next('', 'class="valignbottom"')."</a>";
|
$link="<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"]!='all'?'':'&option=all')."&year=".$prevyear."&month=".$prevmonth."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Month")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".$nextyear."&month=".$nextmonth."'>".img_next('', 'class="valignbottom"')."</a>";
|
||||||
print '<tr><td class="right">'.$link.'</td></tr>';
|
print '<tr><td class="right">'.$link.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center">';
|
print '<tr><td class="center">';
|
||||||
$file = "movement".$account."-".$year.$month.".png";
|
$file = "movement".$account."-".$year.$month.".png";
|
||||||
print $show4;
|
print $show4;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center">';
|
print '<tr><td class="center">';
|
||||||
print $show1;
|
print $show1;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@@ -846,18 +846,18 @@ if ($mode == 'standard')
|
|||||||
$link="<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"]!='all'?'':'&option=all')."&year=".($prevyear)."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Year")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".($nextyear)."'>".img_next('', 'class="valignbottom"')."</a>";
|
$link="<a href='".$_SERVER["PHP_SELF"]."?account=".$account.($_GET["option"]!='all'?'':'&option=all')."&year=".($prevyear)."'>".img_previous('', 'class="valignbottom"')."</a> ".$langs->trans("Year")." <a href='".$_SERVER["PHP_SELF"]."?account=".$account."&year=".($nextyear)."'>".img_next('', 'class="valignbottom"')."</a>";
|
||||||
print '<tr><td class="right">'.$link.'</td></tr>';
|
print '<tr><td class="right">'.$link.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center">';
|
print '<tr><td class="center">';
|
||||||
print $show5;
|
print $show5;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center">';
|
print '<tr><td class="center">';
|
||||||
print $show2;
|
print $show2;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'showalltime')
|
if ($mode == 'showalltime')
|
||||||
{
|
{
|
||||||
print '<tr><td align="center">';
|
print '<tr><td class="center">';
|
||||||
print $show3;
|
print $show3;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ if (! empty($arrayfields['balance']['checked']))
|
|||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre" align="middle">';
|
print '<td class="liste_titre valignmiddle">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -383,19 +383,19 @@ if (! empty($arrayfields['accountype']['checked'])) print_liste_field_titr
|
|||||||
if (! empty($arrayfields['b.number']['checked'])) print_liste_field_titre($arrayfields['b.number']['label'], $_SERVER["PHP_SELF"], 'b.number', '', $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.number']['checked'])) print_liste_field_titre($arrayfields['b.number']['label'], $_SERVER["PHP_SELF"], 'b.number', '', $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.account_number']['checked'])) print_liste_field_titre($arrayfields['b.account_number']['label'], $_SERVER["PHP_SELF"], 'b.account_number', '', $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.account_number']['checked'])) print_liste_field_titre($arrayfields['b.account_number']['label'], $_SERVER["PHP_SELF"], 'b.account_number', '', $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) print_liste_field_titre($arrayfields['b.fk_accountancy_journal']['label'], $_SERVER["PHP_SELF"], 'b.fk_accountancy_journal', '', $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) print_liste_field_titre($arrayfields['b.fk_accountancy_journal']['label'], $_SERVER["PHP_SELF"], 'b.fk_accountancy_journal', '', $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.currency_code']['checked'])) print_liste_field_titre($arrayfields['b.currency_code']['label'], $_SERVER["PHP_SELF"], 'b.currency_code', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.currency_code']['checked'])) print_liste_field_titre($arrayfields['b.currency_code']['label'], $_SERVER["PHP_SELF"], 'b.currency_code', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
if (! empty($arrayfields['toreconcile']['checked'])) print_liste_field_titre($arrayfields['toreconcile']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['toreconcile']['checked'])) print_liste_field_titre($arrayfields['toreconcile']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['b.datec']['checked'])) print_liste_field_titre($arrayfields['b.datec']['label'], $_SERVER["PHP_SELF"], "b.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.datec']['checked'])) print_liste_field_titre($arrayfields['b.datec']['label'], $_SERVER["PHP_SELF"], "b.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
if (! empty($arrayfields['b.tms']['checked'])) print_liste_field_titre($arrayfields['b.tms']['label'], $_SERVER["PHP_SELF"], "b.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.tms']['checked'])) print_liste_field_titre($arrayfields['b.tms']['label'], $_SERVER["PHP_SELF"], "b.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
if (! empty($arrayfields['b.clos']['checked'])) print_liste_field_titre($arrayfields['b.clos']['label'], $_SERVER["PHP_SELF"], 'b.clos', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.clos']['checked'])) print_liste_field_titre($arrayfields['b.clos']['label'], $_SERVER["PHP_SELF"], 'b.clos', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -492,7 +492,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
// Currency
|
// Currency
|
||||||
if (! empty($arrayfields['b.currency_code']['checked']))
|
if (! empty($arrayfields['b.currency_code']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print $obj->currency_code;
|
print $obj->currency_code;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
@@ -501,7 +501,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
// Transactions to reconcile
|
// Transactions to reconcile
|
||||||
if (! empty($arrayfields['toreconcile']['checked']))
|
if (! empty($arrayfields['toreconcile']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($obj->rappro)
|
if ($obj->rappro)
|
||||||
{
|
{
|
||||||
$result=$obj->load_board($user, $obj->id);
|
$result=$obj->load_board($user, $obj->id);
|
||||||
@@ -526,7 +526,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
// Date creation
|
// Date creation
|
||||||
if (! empty($arrayfields['b.datec']['checked']))
|
if (! empty($arrayfields['b.datec']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print dol_print_date($obj->date_creation, 'dayhour');
|
print dol_print_date($obj->date_creation, 'dayhour');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
@@ -534,7 +534,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
// Date modification
|
// Date modification
|
||||||
if (! empty($arrayfields['b.tms']['checked']))
|
if (! empty($arrayfields['b.tms']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print dol_print_date($obj->date_update, 'dayhour');
|
print dol_print_date($obj->date_update, 'dayhour');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
@@ -543,7 +543,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
// Status
|
// Status
|
||||||
if (! empty($arrayfields['b.clos']['checked']))
|
if (! empty($arrayfields['b.clos']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">'.$obj->getLibStatut(5).'</td>';
|
print '<td class="center">'.$obj->getLibStatut(5).'</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -559,7 +559,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap" align="center">';
|
print '<td class="nowrap center">';
|
||||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
{
|
{
|
||||||
$selected=0;
|
$selected=0;
|
||||||
|
|||||||
@@ -496,7 +496,7 @@ if (empty($numref))
|
|||||||
}
|
}
|
||||||
print '<td class="right">'.price(($balancestart[$objp->numr]+$content[$objp->numr]), '', $langs, 1, -1, -1, $conf->currency).'</td>';
|
print '<td class="right">'.price(($balancestart[$objp->numr]+$content[$objp->numr]), '', $langs, 1, -1, -1, $conf->currency).'</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($user->rights->banque->consolidate && $action != 'editbankreceipt') {
|
if ($user->rights->banque->consolidate && $action != 'editbankreceipt') {
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?account='.$object->id.'&action=editbankreceipt&brref='.$objp->numr.'">'.img_edit().'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?account='.$object->id.'&action=editbankreceipt&brref='.$objp->numr.'">'.img_edit().'</a>';
|
||||||
}
|
}
|
||||||
@@ -540,10 +540,10 @@ else
|
|||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td align="center">'.$langs->trans("DateOperationShort").'</td>';
|
print '<td class="center">'.$langs->trans("DateOperationShort").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("DateValueShort").'</td>';
|
print '<td class="center">'.$langs->trans("DateValueShort").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td class="right" width="60">'.$langs->trans("Debit").'</td>';
|
print '<td class="right" width="60">'.$langs->trans("Debit").'</td>';
|
||||||
@@ -589,10 +589,10 @@ else
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Date operation
|
// Date operation
|
||||||
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($objp->do), "day").'</td>';
|
print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->do), "day").'</td>';
|
||||||
|
|
||||||
// Date de valeur
|
// Date de valeur
|
||||||
print '<td align="center" valign="center" class="nowrap">';
|
print '<td valign="center" class="center nowrap">';
|
||||||
print dol_print_date($db->jdate($objp->dv), "day") .' ';
|
print dol_print_date($db->jdate($objp->dv), "day") .' ';
|
||||||
print '<a href="releve.php?action=dvprev&num='.$numref.'&account='.$object->id.'&dvid='.$objp->rowid.'">';
|
print '<a href="releve.php?action=dvprev&num='.$numref.'&account='.$object->id.'&dvid='.$objp->rowid.'">';
|
||||||
print img_edit_remove() . "</a> ";
|
print img_edit_remove() . "</a> ";
|
||||||
@@ -778,13 +778,13 @@ else
|
|||||||
|
|
||||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||||
{
|
{
|
||||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?account='.$object->id.'&num='.$numref).'">';
|
print '<td class="center"><a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?account='.$object->id.'&num='.$numref).'">';
|
||||||
print img_edit();
|
print img_edit();
|
||||||
print "</a></td>";
|
print "</a></td>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\"> </td>";
|
print "<td class=\"center\"> </td>";
|
||||||
}
|
}
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i++;
|
$i++;
|
||||||
@@ -793,11 +793,11 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Line Total
|
// Line Total
|
||||||
print "\n".'<tr class="liste_total"><td class="right" colspan="4">'.$langs->trans("Total")." :</td><td align=\"right\">".price($totald)."</td><td align=\"right\">".price($totalc)."</td><td> </td><td> </td></tr>";
|
print "\n".'<tr class="liste_total"><td class="right" colspan="4">'.$langs->trans("Total")." :</td><td class=\"right\">".price($totald)."</td><td class=\"right\">".price($totalc)."</td><td> </td><td> </td></tr>";
|
||||||
|
|
||||||
// Line Balance
|
// Line Balance
|
||||||
print "\n<tr>";
|
print "\n<tr>";
|
||||||
print "<td align=\"right\" colspan=\"3\"> </td><td colspan=\"3\"><b>".$langs->trans("EndBankBalance")." :</b></td>";
|
print "<td class=\"right\" colspan=\"3\"> </td><td colspan=\"3\"><b>".$langs->trans("EndBankBalance")." :</b></td>";
|
||||||
print '<td class="right"><b>'.price(price2num($total, 'MT'))."</b></td><td> </td>";
|
print '<td class="right"><b>'.price(price2num($total, 'MT'))."</b></td><td> </td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ $label=GETPOST("label", "alpha");
|
|||||||
$sens=GETPOST("sens", "int");
|
$sens=GETPOST("sens", "int");
|
||||||
$amount=GETPOST("amount", "alpha");
|
$amount=GETPOST("amount", "alpha");
|
||||||
$paymenttype=GETPOST("paymenttype", "int");
|
$paymenttype=GETPOST("paymenttype", "int");
|
||||||
$accountancy_code=GETPOST("accountancy_code", "int");
|
$accountancy_code=GETPOST("accountancy_code", "alpha");
|
||||||
$subledger_account=GETPOST("subledger_account", "int");
|
$subledger_account=GETPOST("subledger_account", "alpha");
|
||||||
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
|
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@@ -114,8 +114,8 @@ if (empty($reshook))
|
|||||||
$object->num_payment=GETPOST("num_payment", 'alpha');
|
$object->num_payment=GETPOST("num_payment", 'alpha');
|
||||||
$object->fk_user_author=$user->id;
|
$object->fk_user_author=$user->id;
|
||||||
|
|
||||||
$object->accountancy_code=GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "int") : "";
|
$object->accountancy_code=GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "alpha") : "";
|
||||||
$object->subledger_account=GETPOST("subledger_account") > 0 ? GETPOST("subledger_account", "int") : "";
|
$object->subledger_account=GETPOST("subledger_account") > 0 ? GETPOST("subledger_account", "alpha") : "";
|
||||||
|
|
||||||
$object->sens=GETPOST('sens');
|
$object->sens=GETPOST('sens');
|
||||||
$object->fk_project= GETPOST('fk_project', 'int');
|
$object->fk_project= GETPOST('fk_project', 'int');
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ if ($result)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ if ($result)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
$form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16);
|
$form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -233,13 +233,13 @@ if ($result)
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "v.rowid", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "v.rowid", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "v.label", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "v.label", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "v.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "v.datep", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||||
if (! empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, 'align="left"', $sortfield, $sortorder);
|
if (! empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "v.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "v.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "v.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "v.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ if ($result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Debit
|
// Debit
|
||||||
print "<td align=\"right\">";
|
print "<td class=\"right\">";
|
||||||
if ($obj->sens == 0)
|
if ($obj->sens == 0)
|
||||||
{
|
{
|
||||||
print price($obj->amount);
|
print price($obj->amount);
|
||||||
@@ -309,7 +309,7 @@ if ($result)
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
// Credit
|
// Credit
|
||||||
print "<td align=\"right\">";
|
print "<td class=\"right\">";
|
||||||
if ($obj->sens == 1)
|
if ($obj->sens == 1)
|
||||||
{
|
{
|
||||||
print price($obj->amount);
|
print price($obj->amount);
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ if ($year) $param.='&year='.$year;
|
|||||||
|
|
||||||
if ($mode != 'sconly')
|
if ($mode != 'sconly')
|
||||||
{
|
{
|
||||||
print $langs->trans("DescTaxAndDividendsArea").'<br>';
|
print '<span class="opacitymedium">'.$langs->trans("DescTaxAndDividendsArea").'</span><br>';
|
||||||
print "<br>";
|
print "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -146,28 +146,28 @@ if ($resql)
|
|||||||
|
|
||||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", "", 'valign="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", "", 'valign="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Town", $_SERVER["PHP_SELF"], "s.town", "", "", 'valign="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Town", $_SERVER["PHP_SELF"], "s.town", "", "", 'valign="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", "", "", 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", "", "", '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre("AccountancyCode", $_SERVER["PHP_SELF"], "s.code_compta", "", "", 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("AccountancyCode", $_SERVER["PHP_SELF"], "s.code_compta", "", "", '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "datec", $addu, "", 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "datec", $addu, "", '', $sortfield, $sortorder, 'right ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
print '<td align="left" class="liste_titre">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" name="search_nom" value="'.$_GET["search_nom"].'"></td>';
|
print '<input class="flat" type="text" name="search_nom" value="'.$_GET["search_nom"].'"></td>';
|
||||||
|
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
|
|
||||||
print '<td align="left" class="liste_titre">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" size="10" name="search_code_client" value="'.$_GET["search_code_client"].'">';
|
print '<input class="flat" type="text" size="10" name="search_code_client" value="'.$_GET["search_code_client"].'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="left" class="liste_titre">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" size="10" name="search_compta" value="'.$_GET["search_compta"].'">';
|
print '<input class="flat" type="text" size="10" name="search_compta" value="'.$_GET["search_compta"].'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right" colspan="2" class="liste_titre">';
|
print '<td colspan="2" class="liste_titre right">';
|
||||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@@ -186,7 +186,7 @@ if ($resql)
|
|||||||
print '<td>'.$obj->town.' </td>';
|
print '<td>'.$obj->town.' </td>';
|
||||||
print '<td class="left">'.$obj->code_client.' </td>';
|
print '<td class="left">'.$obj->code_client.' </td>';
|
||||||
print '<td class="left">'.$obj->code_compta.' </td>';
|
print '<td class="left">'.$obj->code_compta.' </td>';
|
||||||
print '<td align="right">'.dol_print_date($db->jdate($obj->datec)).'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->datec)).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||||
|
|
||||||
$langs->loadLangs(array("accountancy","bills"));
|
$langs->loadLangs(array("accountancy","bills"));
|
||||||
@@ -59,7 +60,7 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
|
|||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
if (! $sortfield) $sortfield="f.datef,f.rowid"; // Set here default search field
|
if (! $sortfield) $sortfield="date,item"; // Set here default search field
|
||||||
if (! $sortorder) $sortorder="DESC";
|
if (! $sortorder) $sortorder="DESC";
|
||||||
|
|
||||||
|
|
||||||
@@ -69,7 +70,7 @@ $arrayfields=array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->compta->enabled) && empty($conf->accounting->enabled)) {
|
if (empty($conf->comptabilite->enabled) && empty($conf->accounting->enabled)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
@@ -81,31 +82,47 @@ if ($user->societe_id > 0)
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$entity = GETPOST('entity', 'int')?GETPOST('entity', 'int'):$conf->entity;
|
||||||
|
|
||||||
//$parameters = array('socid' => $id);
|
//$parameters = array('socid' => $id);
|
||||||
//$reshook = $hookmanager->executeHooks('doActions', $parameters, $object); // Note that $object may have been modified by some hooks
|
//$reshook = $hookmanager->executeHooks('doActions', $parameters, $object); // Note that $object may have been modified by some hooks
|
||||||
//if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
//if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
$filesarray=array();
|
$filesarray=array();
|
||||||
$result=false;
|
$result=false;
|
||||||
if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
if(($action=="searchfiles" || $action=="dl" ) && $date_start && $date_stop) {
|
||||||
$wheretail=" '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
|
$wheretail=" '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
|
||||||
$sql="SELECT rowid as id, ref as ref,paye as paid, total_ttc, fk_soc, datef as date, 'Invoice' as item FROM ".MAIN_DB_PREFIX."facture";
|
$sql="SELECT rowid as id, ref as ref,paye as paid, total_ttc, fk_soc, datef as date, 'Invoice' as item FROM ".MAIN_DB_PREFIX."facture";
|
||||||
$sql.=" WHERE datef between ".$wheretail;
|
$sql.=" WHERE datef between ".$wheretail;
|
||||||
|
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||||
|
$sql.=" AND fk_statut <> ".Facture::STATUS_DRAFT;
|
||||||
$sql.=" UNION ALL";
|
$sql.=" UNION ALL";
|
||||||
$sql.=" SELECT rowid as id, ref, paye as paid, total_ttc, fk_soc, datef as date, 'InvoiceSupplier' as item FROM ".MAIN_DB_PREFIX."facture_fourn";
|
$sql.=" SELECT rowid as id, ref, paye as paid, total_ttc, fk_soc, datef as date, 'SupplierInvoice' as item FROM ".MAIN_DB_PREFIX."facture_fourn";
|
||||||
$sql.=" WHERE datef between ".$wheretail;
|
$sql.=" WHERE datef between ".$wheretail;
|
||||||
|
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||||
|
$sql.=" AND fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
|
||||||
$sql.=" UNION ALL";
|
$sql.=" UNION ALL";
|
||||||
$sql.=" SELECT rowid as id, ref, paid, total_ttc, fk_user_author as fk_soc, date_fin as date,'ExpenseReport' as item FROM ".MAIN_DB_PREFIX."expensereport";
|
$sql.=" SELECT rowid as id, ref, paid, total_ttc, fk_user_author as fk_soc, date_fin as date, 'ExpenseReport' as item FROM ".MAIN_DB_PREFIX."expensereport";
|
||||||
$sql.=" WHERE date_fin between ".$wheretail;
|
$sql.=" WHERE date_fin between ".$wheretail;
|
||||||
|
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||||
|
$sql.=" AND fk_statut <> ".ExpenseReport::STATUS_DRAFT;
|
||||||
$sql.=" UNION ALL";
|
$sql.=" UNION ALL";
|
||||||
$sql.=" SELECT rowid as id, ref,paid,amount as total_ttc, '0' as fk_soc, datedon as date,'Donation' as item FROM ".MAIN_DB_PREFIX."don";
|
$sql.=" SELECT rowid as id, ref,paid,amount as total_ttc, '0' as fk_soc, datedon as date, 'Donation' as item FROM ".MAIN_DB_PREFIX."don";
|
||||||
$sql.=" WHERE datedon between ".$wheretail;
|
$sql.=" WHERE datedon between ".$wheretail;
|
||||||
|
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||||
|
$sql.=" AND fk_statut <> ".Don::STATUS_DRAFT;
|
||||||
$sql.=" UNION ALL";
|
$sql.=" UNION ALL";
|
||||||
$sql.=" SELECT rowid as id, label as ref, 1 as paid, amount as total_ttc, fk_user as fk_soc,datep as date,'SalaryPayment' as item FROM ".MAIN_DB_PREFIX."payment_salary";
|
$sql.=" SELECT rowid as id, label as ref, 1 as paid, amount as total_ttc, fk_user as fk_soc,datep as date, 'SalaryPayment' as item FROM ".MAIN_DB_PREFIX."payment_salary";
|
||||||
$sql.=" WHERE datep between ".$wheretail;
|
$sql.=" WHERE datep between ".$wheretail;
|
||||||
|
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||||
|
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
|
||||||
$sql.=" UNION ALL";
|
$sql.=" UNION ALL";
|
||||||
$sql.=" SELECT rowid as id, libelle as ref, paye as paid, amount as total_ttc, 0 as fk_soc, date_creation as date, 'SocialContributions' as item FROM ".MAIN_DB_PREFIX."chargesociales";
|
$sql.=" SELECT rowid as id, libelle as ref, paye as paid, amount as total_ttc, 0 as fk_soc, date_creation as date, 'SocialContributions' as item FROM ".MAIN_DB_PREFIX."chargesociales";
|
||||||
$sql.=" WHERE date_creation between ".$wheretail;
|
$sql.=" WHERE date_creation between ".$wheretail;
|
||||||
|
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||||
|
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
|
||||||
|
$sql.= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
$resd = $db->query($sql);
|
$resd = $db->query($sql);
|
||||||
$files=array();
|
$files=array();
|
||||||
$link='';
|
$link='';
|
||||||
@@ -120,7 +137,7 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
|||||||
|
|
||||||
$upload_dir ='';
|
$upload_dir ='';
|
||||||
$i=0;
|
$i=0;
|
||||||
while($i<$numd)
|
while ($i < $numd)
|
||||||
{
|
{
|
||||||
$objd = $db->fetch_object($resd);
|
$objd = $db->fetch_object($resd);
|
||||||
|
|
||||||
@@ -131,18 +148,18 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
|||||||
$upload_dir = $conf->facture->dir_output.'/'.$subdir;
|
$upload_dir = $conf->facture->dir_output.'/'.$subdir;
|
||||||
$link="document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
case "InvoiceSupplier":
|
case "SupplierInvoice":
|
||||||
$tmpinvoicesupplier->fetch($objd->id);
|
$tmpinvoicesupplier->fetch($objd->id);
|
||||||
$subdir=get_exdir(0, 0, 0, 1, $tmpinvoicesupplier, 'invoice_supplier').'/'.dol_sanitizeFileName($objd->ref);
|
$subdir=get_exdir($tmpinvoicesupplier->id, 2, 0, 0, $tmpinvoicesupplier, 'invoice_supplier').'/'.dol_sanitizeFileName($objd->ref);
|
||||||
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
|
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
|
||||||
$link="document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
case "Expense":
|
case "ExpenseReport":
|
||||||
$subdir=dol_sanitizeFileName($objd->ref);
|
$subdir=dol_sanitizeFileName($objd->ref);
|
||||||
$upload_dir = $conf->expensereport->dir_output.'/'.$subdir;
|
$upload_dir = $conf->expensereport->dir_output.'/'.$subdir;
|
||||||
$link="document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
case "Salary":
|
case "SalaryPayment":
|
||||||
$subdir=dol_sanitizeFileName($objd->id);
|
$subdir=dol_sanitizeFileName($objd->id);
|
||||||
$upload_dir = $conf->salaries->dir_output.'/'.$subdir;
|
$upload_dir = $conf->salaries->dir_output.'/'.$subdir;
|
||||||
$link="document.php?modulepart=salaries&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=salaries&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
@@ -169,7 +186,9 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
|||||||
{
|
{
|
||||||
$result=true;
|
$result=true;
|
||||||
$files=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
|
$files=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
|
||||||
if (count($files)<1) {
|
//var_dump($upload_dir);
|
||||||
|
if (count($files) < 1)
|
||||||
|
{
|
||||||
$nofile['date']=$db->idate($objd->date);
|
$nofile['date']=$db->idate($objd->date);
|
||||||
$nofile['paid']=$objd->paid;
|
$nofile['paid']=$objd->paid;
|
||||||
$nofile['amount']=$objd->total_ttc;
|
$nofile['amount']=$objd->total_ttc;
|
||||||
@@ -212,15 +231,19 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
|||||||
*/
|
*/
|
||||||
//FIXME
|
//FIXME
|
||||||
/*
|
/*
|
||||||
*ZIP creation
|
*ZIP creation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($result && $action == "dl")
|
if ($result && $action == "dl")
|
||||||
{
|
{
|
||||||
dol_delete_file($zip);
|
$dirfortmpfile = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->compta->dir_temp);
|
||||||
|
|
||||||
|
dol_mkdir($dirfortmpfile);
|
||||||
|
|
||||||
$log='date,type,ref,total,paid,filename,item_id'."\n";
|
$log='date,type,ref,total,paid,filename,item_id'."\n";
|
||||||
$zipname = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->compta->dir_temp).'/'.($date_start)."-".($date_stop).'_export.zip';
|
$zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip';
|
||||||
|
|
||||||
|
dol_delete_file($zipname);
|
||||||
|
|
||||||
$zip = new ZipArchive;
|
$zip = new ZipArchive;
|
||||||
$res = $zip->open($zipname, ZipArchive::OVERWRITE|ZipArchive::CREATE);
|
$res = $zip->open($zipname, ZipArchive::OVERWRITE|ZipArchive::CREATE);
|
||||||
@@ -229,7 +252,7 @@ if ($result && $action == "dl")
|
|||||||
foreach ($filesarray as $key=> $file)
|
foreach ($filesarray as $key=> $file)
|
||||||
{
|
{
|
||||||
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); //
|
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); //
|
||||||
$log.=$file['date'].','.$file['item'].','.$file['ref'].','.$file['amount'].','.$file['paid'].','.$file["name"].','.$file['fk']."\n";
|
$log.=dol_print_date($file['date'], 'dayrfc').','.$file['item'].','.$file['ref'].','.$file['amount'].','.$file['paid'].','.$file["name"].','.$file['fk']."\n";
|
||||||
}
|
}
|
||||||
$zip->addFromString('transactions.csv', $log);
|
$zip->addFromString('transactions.csv', $log);
|
||||||
$zip->close();
|
$zip->close();
|
||||||
@@ -251,21 +274,63 @@ if ($result && $action == "dl")
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
$userstatic=new User($db);
|
||||||
|
|
||||||
|
$title=$langs->trans("ComptaFiles").' - '.$langs->trans("List");
|
||||||
|
|
||||||
llxHeader('', $title, $help_url);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
$head[$h][0] = $_SERVER["PHP_SELF"].$varlink;
|
$head[$h][0] = $_SERVER["PHP_SELF"].$varlink;
|
||||||
$head[$h][1] = $langs->trans("AccountantFiles");
|
$head[$h][1] = $langs->trans("AccountantFiles");
|
||||||
$head[$h][2] = 'AccountantFiles';
|
$head[$h][2] = 'AccountancyFiles';
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'AccountancyFiles');
|
||||||
|
|
||||||
dol_fiche_head($head, 'AccountantFiles');
|
|
||||||
|
|
||||||
$form = new Form($db);
|
|
||||||
$userstatic=new User($db);
|
|
||||||
$title=$langs->trans("ComptaFiles").' - '.$langs->trans("List");
|
|
||||||
print '<form name="searchfiles" action="?action=searchfiles'.$tail.'" method="POST" >'."\n";
|
print '<form name="searchfiles" action="?action=searchfiles'.$tail.'" method="POST" >'."\n";
|
||||||
print $langs->trans("ReportPeriod").': '.$form->select_date($date_start, 'date_start', 0, 0, 0, "", 1, 1, 1);
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print ' - '.$form->select_date($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 1)."\n</a>";
|
print $langs->trans("ReportPeriod").': '.$form->selectDate($date_start, 'date_start', 0, 0, 0, "", 1, 1, 0);
|
||||||
|
print ' - '.$form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0)."\n</a>";
|
||||||
|
// Multicompany
|
||||||
|
/*if (! empty($conf->multicompany->enabled) && is_object($mc))
|
||||||
|
{
|
||||||
|
print '<br>';
|
||||||
|
// This is now done with hook formObjectOptions. Keep this code for backward compatibility with old multicompany module
|
||||||
|
if (method_exists($mc, 'formObjectOptions'))
|
||||||
|
{
|
||||||
|
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity) // condition must be same for create and edit mode
|
||||||
|
{
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Entity").'</td>';
|
||||||
|
print "<td>".$mc->select_entities($entity);
|
||||||
|
print "</td></tr>\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$object = new stdClass();
|
||||||
|
// Other attributes
|
||||||
|
$parameters=array('objectsrc' => null, 'colspan' => ' colspan="3"');
|
||||||
|
$reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
if (empty($reshook))
|
||||||
|
{
|
||||||
|
print $object->showOptionals($extrafields, 'edit');
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
if (! empty($conf->multicompany->enabled) && is_object($mc))
|
||||||
|
{
|
||||||
|
print ' - '.$langs->trans("Entity").' : ';
|
||||||
|
$mc->dao->getEntities();
|
||||||
|
$mc->dao->fetch($conf->entity);
|
||||||
|
print $mc->dao->label;
|
||||||
|
print "<br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
print '<input class="button" type="submit" value="'.$langs->trans("Refresh").'" /></form>'."\n";
|
print '<input class="button" type="submit" value="'.$langs->trans("Refresh").'" /></form>'."\n";
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
@@ -281,6 +346,7 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
$param.='&date_stopyear='.GETPOST('date_stopyear', 'int');
|
$param.='&date_stopyear='.GETPOST('date_stopyear', 'int');
|
||||||
|
|
||||||
print '<form name="dl" action="?action=dl" method="POST" >'."\n";
|
print '<form name="dl" action="?action=dl" method="POST" >'."\n";
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|
||||||
echo dol_print_date($date_start, 'day')." - ".dol_print_date($date_stop, 'day');
|
echo dol_print_date($date_start, 'day')." - ".dol_print_date($date_stop, 'day');
|
||||||
|
|
||||||
@@ -308,24 +374,28 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
print '<td>'.$langs->trans("Ref").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td>';
|
||||||
print '<td>'.$langs->trans("Link").'</td>';
|
print '<td>'.$langs->trans("Link").'</td>';
|
||||||
print '<td>'.$langs->trans("Paid").'</td>';
|
print '<td>'.$langs->trans("Paid").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Debit").'</td>';
|
print '<td class="right">'.$langs->trans("Debit").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Credit").'</td>';
|
print '<td class="right">'.$langs->trans("Credit").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Balance").'</td>';
|
print '<td class="right">'.$langs->trans("Balance").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$TData = dol_sort_array($filesarray, 'date', 'ASC');
|
$TData = dol_sort_array($filesarray, 'date', 'ASC');
|
||||||
if(empty($TData)) {
|
|
||||||
|
if (empty($TData))
|
||||||
|
{
|
||||||
print '<tr class="oddeven"><td colspan="7">'.$langs->trans("NoItem").'</td></tr>';
|
print '<tr class="oddeven"><td colspan="7">'.$langs->trans("NoItem").'</td></tr>';
|
||||||
} else {
|
}
|
||||||
// Sort array by date ASC to calucalte balance
|
else
|
||||||
|
{
|
||||||
|
// Sort array by date ASC to calculate balance
|
||||||
|
|
||||||
$totalDebit = 0;
|
$totalDebit = 0;
|
||||||
$totalCredit = 0;
|
$totalCredit = 0;
|
||||||
// Balance calculation
|
// Balance calculation
|
||||||
$balance = 0;
|
$balance = 0;
|
||||||
foreach($TData as &$data1) {
|
foreach($TData as &$data1) {
|
||||||
if($data1['item']!='Invoice'&& $data1['item']!='Donation' ){
|
if ($data1['item']!='Invoice'&& $data1['item']!='Donation' ){
|
||||||
$data1['amount']=-$data1['amount'];
|
$data1['amount']=-$data1['amount'];
|
||||||
}
|
}
|
||||||
if ($data1['amount']>0){
|
if ($data1['amount']>0){
|
||||||
@@ -334,8 +404,10 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
$balance += $data1['amount'];
|
$balance += $data1['amount'];
|
||||||
$data1['balance'] = $balance;
|
$data1['balance'] = $balance;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display array
|
// Display array
|
||||||
foreach($TData as $data) {
|
foreach($TData as $data)
|
||||||
|
{
|
||||||
$html_class = '';
|
$html_class = '';
|
||||||
//if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture'];
|
//if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture'];
|
||||||
//elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement'];
|
//elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement'];
|
||||||
@@ -343,26 +415,27 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
print dol_print_date($data['date'], 'day');
|
print dol_print_date($data['date'], 'day');
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '<td aling="left">'.$data['item'].'</td>';
|
print '<td aling="left">'.$langs->trans($data['item']).'</td>';
|
||||||
print '<td aling="left">'.$data['ref'].'</td>';
|
print '<td aling="left">'.$data['ref'].'</td>';
|
||||||
|
|
||||||
// File link
|
// File link
|
||||||
print '<td><a href='.DOL_URL_ROOT.'/'.$data['link'].">".$data['name']."</a></td>\n";
|
print '<td><a href='.DOL_URL_ROOT.'/'.$data['link'].">".$data['name']."</a></td>\n";
|
||||||
|
|
||||||
print '<td aling="left">'.$data['paid'].'</td>';
|
print '<td class="left">'.$data['paid'].'</td>';
|
||||||
print '<td align="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n";
|
print '<td class="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n";
|
||||||
$totalDebit += ($data['amount'] > 0) ? abs($data['amount']) : 0;
|
$totalDebit += ($data['amount'] > 0) ? abs($data['amount']) : 0;
|
||||||
print '<td align="right">'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."</td>\n";
|
print '<td class="right">'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."</td>\n";
|
||||||
$totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']);
|
$totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']);
|
||||||
// Balance
|
// Balance
|
||||||
print '<td align="right">'.price($data['balance'])."</td>\n";
|
print '<td class="right">'.price($data['balance'])."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="5"> </td>';
|
print '<td colspan="5"> </td>';
|
||||||
print '<td align="right">'.price($totalDebit).'</td>';
|
print '<td class="right">'.price($totalDebit).'</td>';
|
||||||
print '<td align="right">'.price($totalCredit).'</td>';
|
print '<td class="right">'.price($totalCredit).'</td>';
|
||||||
print '<td align="right">'.price(price2num($totalDebit - $totalCredit, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num($totalDebit - $totalCredit, 'MT')).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -370,6 +443,5 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@@ -696,6 +696,7 @@ if (empty($reshook))
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$amount_ht = $amount_tva = $amount_ttc = array();
|
$amount_ht = $amount_tva = $amount_ttc = array();
|
||||||
|
$multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array();
|
||||||
|
|
||||||
// Loop on each vat rate
|
// Loop on each vat rate
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@@ -709,7 +710,7 @@ if (empty($reshook))
|
|||||||
$multicurrency_amount_ht[$line->tva_tx] += $line->multicurrency_total_ht;
|
$multicurrency_amount_ht[$line->tva_tx] += $line->multicurrency_total_ht;
|
||||||
$multicurrency_amount_tva[$line->tva_tx] += $line->multicurrency_total_tva;
|
$multicurrency_amount_tva[$line->tva_tx] += $line->multicurrency_total_tva;
|
||||||
$multicurrency_amount_ttc[$line->tva_tx] += $line->multicurrency_total_ttc;
|
$multicurrency_amount_ttc[$line->tva_tx] += $line->multicurrency_total_ttc;
|
||||||
$i ++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4671,6 +4672,13 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// POS Ticket
|
||||||
|
if (! empty($conf->takepos->enabled) && $object->module_source != '')
|
||||||
|
{
|
||||||
|
$receipt_url=DOL_URL_ROOT."/takepos/receipt.php";
|
||||||
|
print '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="' . $receipt_url . '?facid=' . $object->id.'">' . $langs->trans('POSTicket') .'</a></div>';
|
||||||
|
}
|
||||||
|
|
||||||
// Classify paid
|
// Classify paid
|
||||||
if ($object->statut == 1 && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0))
|
if ($object->statut == 1 && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0))
|
||||||
|| ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id))
|
|| ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id))
|
||||||
|
|||||||
@@ -56,11 +56,12 @@ class Invoices extends DolibarrApi
|
|||||||
* Return an array with invoice informations
|
* Return an array with invoice informations
|
||||||
*
|
*
|
||||||
* @param int $id ID of invoice
|
* @param int $id ID of invoice
|
||||||
|
* @param int $contact_list 0:Return array contains all properties, 1:Return array contains just id
|
||||||
* @return array|mixed data without useless information
|
* @return array|mixed data without useless information
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function get($id)
|
function get($id, $contact_list = 1)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->facture->lire) {
|
if(! DolibarrApiAccess::$user->rights->facture->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@@ -82,7 +83,7 @@ class Invoices extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add external contacts ids
|
// Add external contacts ids
|
||||||
$this->invoice->contacts_ids = $this->invoice->liste_contact(-1, 'external', 1);
|
$this->invoice->contacts_ids = $this->invoice->liste_contact(-1, 'external', $contact_list);
|
||||||
|
|
||||||
$this->invoice->fetchObjectLinked();
|
$this->invoice->fetchObjectLinked();
|
||||||
return $this->_cleanObjectDatas($this->invoice);
|
return $this->_cleanObjectDatas($this->invoice);
|
||||||
@@ -372,6 +373,86 @@ class Invoices extends DolibarrApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a contact type of given invoice
|
||||||
|
*
|
||||||
|
* @param int $id Id of invoice to update
|
||||||
|
* @param int $contactid Id of contact to add
|
||||||
|
* @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER)
|
||||||
|
*
|
||||||
|
* @url POST {id}/contact/{contactid}/{type}
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
* @throws 401
|
||||||
|
* @throws 404
|
||||||
|
*/
|
||||||
|
function postContact($id, $contactid, $type)
|
||||||
|
{
|
||||||
|
if(!DolibarrApiAccess::$user->rights->facture->creer) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->invoice->fetch($id);
|
||||||
|
|
||||||
|
if(!$result) {
|
||||||
|
throw new RestException(404, 'Invoice not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($type, array('BILLING', 'SHIPPING', 'CUSTOMER'), true)) {
|
||||||
|
throw new RestException(500, 'Availables types: BILLING, SHIPPING OR CUSTOMER');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!DolibarrApi::_checkAccessToResource('invoice', $this->invoice->id)) {
|
||||||
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->invoice->add_contact($contactid, $type, 'external');
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
throw new RestException(500, 'Error when added the contact');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->_cleanObjectDatas($this->invoice);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a contact type of given invoice
|
||||||
|
*
|
||||||
|
* @param int $id Id of invoice to update
|
||||||
|
* @param int $rowid Row key of the contact in the array contact_ids.
|
||||||
|
*
|
||||||
|
* @url DELETE {id}/contact/{rowid}
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
* @throws 401
|
||||||
|
* @throws 404
|
||||||
|
* @throws 500
|
||||||
|
*/
|
||||||
|
function deleteContact($id, $rowid)
|
||||||
|
{
|
||||||
|
if(!DolibarrApiAccess::$user->rights->facture->creer) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->invoice->fetch($id);
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
throw new RestException(404, 'Invoice not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!DolibarrApi::_checkAccessToResource('invoice', $this->invoice->id)) {
|
||||||
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->invoice->delete_contact($rowid);
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
throw new RestException(500, 'Error when deleted the contact');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->_cleanObjectDatas($this->invoice);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a line of a given invoice
|
* Deletes a line of a given invoice
|
||||||
*
|
*
|
||||||
@@ -839,6 +920,120 @@ class Invoices extends DolibarrApi
|
|||||||
return $this->_cleanObjectDatas($this->invoice);
|
return $this->_cleanObjectDatas($this->invoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a discount (credit available) for a credit note or a deposit.
|
||||||
|
*
|
||||||
|
* @param int $id Invoice ID
|
||||||
|
* @url POST {id}/markAsCreditAvailable
|
||||||
|
*
|
||||||
|
* @return array An invoice object
|
||||||
|
*
|
||||||
|
* @throws 200
|
||||||
|
* @throws 304
|
||||||
|
* @throws 401
|
||||||
|
* @throws 404
|
||||||
|
* @throws 500
|
||||||
|
*/
|
||||||
|
function markAsCreditAvailable($id)
|
||||||
|
{
|
||||||
|
if(! DolibarrApiAccess::$user->rights->facture->creer) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->invoice->fetch($id);
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'Invoice not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ! DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) {
|
||||||
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->invoice->fetch_thirdparty();
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'Thirdparty not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $this->invoice->paye) // protection against multiple submit
|
||||||
|
{
|
||||||
|
$this->db->begin();
|
||||||
|
$this->invoice->fetch_lines();
|
||||||
|
|
||||||
|
// Loop on each vat rate
|
||||||
|
$i=0;
|
||||||
|
$amount_ht = array();
|
||||||
|
$amount_tva = array();
|
||||||
|
$amount_ttc = array();
|
||||||
|
foreach($this->invoice->lines as $line)
|
||||||
|
{
|
||||||
|
$amount_ht[$line->tva_tx]+=$line->total_ht;
|
||||||
|
$amount_tva[$line->tva_tx]+=$line->total_tva;
|
||||||
|
$amount_ttc[$line->tva_tx]+=$line->total_ttc;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Insert one discount by VAT rate category
|
||||||
|
$discount = new DiscountAbsolute($this->db);
|
||||||
|
if ($this->invoice->type == 2) $discount->description='(CREDIT_NOTE)';
|
||||||
|
elseif ($this->invoice->type == 3) $discount->description='(DEPOSIT)';
|
||||||
|
else {
|
||||||
|
$this->error="CantConvertToReducAnInvoiceOfThisType";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
$discount->tva_tx=abs($this->invoice->total_ttc);
|
||||||
|
$discount->fk_soc=$this->invoice->socid;
|
||||||
|
$discount->fk_facture_source=$this->invoice->id;
|
||||||
|
|
||||||
|
$error=0;
|
||||||
|
foreach($amount_ht as $tva_tx => $xxx)
|
||||||
|
{
|
||||||
|
$discount->amount_ht=abs($amount_ht[$tva_tx]);
|
||||||
|
$discount->amount_tva=abs($amount_tva[$tva_tx]);
|
||||||
|
$discount->amount_ttc=abs($amount_ttc[$tva_tx]);
|
||||||
|
$discount->tva_tx=abs($tva_tx);
|
||||||
|
|
||||||
|
$result=$discount->create(DolibarrApiAccess::$user);
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
// Classe facture
|
||||||
|
$result=$this->invoice->set_paid(DolibarrApiAccess::$user);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
//$mesg='OK'.$discount->id;
|
||||||
|
$this->db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->db->rollback();
|
||||||
|
throw new RestException(500, 'Could not set paid');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->db->rollback();
|
||||||
|
throw new RestException(500, 'Discount creation error');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->invoice->fetch($id);
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'Invoice not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ! DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) {
|
||||||
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->_cleanObjectDatas($this->invoice);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a discount line into an invoice (as an invoice line) using an existing absolute discount
|
* Add a discount line into an invoice (as an invoice line) using an existing absolute discount
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -960,7 +960,7 @@ class FactureRec extends CommonInvoice
|
|||||||
/**
|
/**
|
||||||
* Return the next date of
|
* Return the next date of
|
||||||
*
|
*
|
||||||
* @return timestamp false if KO, timestamp if OK
|
* @return int|false false if KO, timestamp if OK
|
||||||
*/
|
*/
|
||||||
function getNextDate()
|
function getNextDate()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1120,6 +1120,9 @@ class Facture extends CommonInvoice
|
|||||||
$this->note_private = $object->note_private;
|
$this->note_private = $object->note_private;
|
||||||
$this->note_public = $object->note_public;
|
$this->note_public = $object->note_public;
|
||||||
|
|
||||||
|
$this->module_source = $object->module_source;
|
||||||
|
$this->pos_source = $object->pos_source;
|
||||||
|
|
||||||
$this->origin = $object->element;
|
$this->origin = $object->element;
|
||||||
$this->origin_id = $object->id;
|
$this->origin_id = $object->id;
|
||||||
|
|
||||||
@@ -1324,6 +1327,7 @@ class Facture extends CommonInvoice
|
|||||||
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
||||||
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
||||||
$sql.= ', f.fk_incoterms, f.location_incoterms';
|
$sql.= ', f.fk_incoterms, f.location_incoterms';
|
||||||
|
$sql.= ', f.module_source, f.pos_source';
|
||||||
$sql.= ", i.libelle as libelle_incoterms";
|
$sql.= ", i.libelle as libelle_incoterms";
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid';
|
||||||
@@ -1400,6 +1404,9 @@ class Facture extends CommonInvoice
|
|||||||
$this->location_incoterms = $obj->location_incoterms;
|
$this->location_incoterms = $obj->location_incoterms;
|
||||||
$this->libelle_incoterms = $obj->libelle_incoterms;
|
$this->libelle_incoterms = $obj->libelle_incoterms;
|
||||||
|
|
||||||
|
$this->module_source = $obj->module_source;
|
||||||
|
$this->pos_source = $obj->pos_source;
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
$this->fk_multicurrency = $obj->fk_multicurrency;
|
$this->fk_multicurrency = $obj->fk_multicurrency;
|
||||||
$this->multicurrency_code = $obj->multicurrency_code;
|
$this->multicurrency_code = $obj->multicurrency_code;
|
||||||
|
|||||||
@@ -200,14 +200,14 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print $companystatic->getNomUrl(1, 'customer', 16);
|
print $companystatic->getNomUrl(1, 'customer', 16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right" class="nowrap">'.price($obj->total_ttc).'</td>';
|
print '<td class="nowrap right">'.price($obj->total_ttc).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$tot_ttc+=$obj->total_ttc;
|
$tot_ttc+=$obj->total_ttc;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total"><td class="left">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td class="left">'.$langs->trans("Total").'</td>';
|
||||||
print '<td colspan="2" align="right">'.price($tot_ttc).'</td>';
|
print '<td colspan="2" class="right">'.price($tot_ttc).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -287,14 +287,14 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $companystatic->getNomUrl(1, 'supplier', 16);
|
print $companystatic->getNomUrl(1, 'supplier', 16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$tot_ttc+=$obj->total_ttc;
|
$tot_ttc+=$obj->total_ttc;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total"><td class="left">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td class="left">'.$langs->trans("Total").'</td>';
|
||||||
print '<td colspan="2" align="right">'.price($tot_ttc).'</td>';
|
print '<td colspan="2" class="right">'.price($tot_ttc).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -353,9 +353,9 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("BoxTitleLastCustomerBills", $max).'</th>';
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("BoxTitleLastCustomerBills", $max).'</th>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th align="right">'.$langs->trans("AmountHT").'</th>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th class="right">'.$langs->trans("AmountHT").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("AmountTTC").'</th>';
|
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("DateModificationShort").'</th>';
|
print '<th class="right">'.$langs->trans("DateModificationShort").'</th>';
|
||||||
print '<th width="16"> </th>';
|
print '<th width="16"> </th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($num)
|
if ($num)
|
||||||
@@ -398,7 +398,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print img_warning($langs->trans("Late"));
|
print img_warning($langs->trans("Late"));
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
print '<td width="16" class="nobordernopadding hideonsmartphone right">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
||||||
@@ -409,9 +409,9 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
print $thirdpartystatic->getNomUrl(1, 'customer', 44);
|
print $thirdpartystatic->getNomUrl(1, 'customer', 44);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td class="right">'.price($obj->total_ht).'</td>';
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
||||||
print '<td align="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
||||||
print '<td>'.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3, $obj->am).'</td>';
|
print '<td>'.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3, $obj->am).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -474,9 +474,9 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("BoxTitleLastSupplierBills", $max).'</th>';
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("BoxTitleLastSupplierBills", $max).'</th>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th align="right">'.$langs->trans("AmountHT").'</th>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th class="right">'.$langs->trans("AmountHT").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("AmountTTC").'</th>';
|
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("DateModificationShort").'</th>';
|
print '<th class="right">'.$langs->trans("DateModificationShort").'</th>';
|
||||||
print '<th width="16"> </th>';
|
print '<th width="16"> </th>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
if ($num)
|
if ($num)
|
||||||
@@ -507,9 +507,9 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $thirdpartystatic->getNomUrl(1, 'supplier', 44);
|
print $thirdpartystatic->getNomUrl(1, 'supplier', 44);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td class="right">'.price($obj->total_ht).'</td>';
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
||||||
print '<td align="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->tms), 'day').'</td>';
|
||||||
print '<td>'.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3).'</td>';
|
print '<td>'.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$total += $obj->total_ht;
|
$total += $obj->total_ht;
|
||||||
@@ -565,8 +565,8 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th>'.$langs->trans("BoxTitleLastModifiedDonations", $max).'</th>';
|
print '<th>'.$langs->trans("BoxTitleLastModifiedDonations", $max).'</th>';
|
||||||
print '<th></th>';
|
print '<th></th>';
|
||||||
print '<th align="right">'.$langs->trans("AmountTTC").'</th>';
|
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("DateModificationShort").'</th>';
|
print '<th class="right">'.$langs->trans("DateModificationShort").'</th>';
|
||||||
print '<th width="16"> </th>';
|
print '<th width="16"> </th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($num)
|
if ($num)
|
||||||
@@ -588,8 +588,8 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire)
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$donationstatic->getNomUrl(1).'</td>';
|
print '<td>'.$donationstatic->getNomUrl(1).'</td>';
|
||||||
print '<td>'.$label.'</td>';
|
print '<td>'.$label.'</td>';
|
||||||
print '<td align="right">'.price($objp->amount).'</td>';
|
print '<td class="right">'.price($objp->amount).'</td>';
|
||||||
print '<td align="right">'.dol_print_date($db->jdate($objp->dm), 'day').'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($objp->dm), 'day').'</td>';
|
||||||
print '<td>'.$donationstatic->LibStatut($objp->fk_statut, 3).'</td>';
|
print '<td>'.$donationstatic->LibStatut($objp->fk_statut, 3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -638,8 +638,8 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th>'.$langs->trans("ContributionsToPay").($num?' <a href="'.DOL_URL_ROOT.'/compta/sociales/list.php?status=0"><span class="badge">'.$num.'</span></a>':'').'</th>';
|
print '<th>'.$langs->trans("ContributionsToPay").($num?' <a href="'.DOL_URL_ROOT.'/compta/sociales/list.php?status=0"><span class="badge">'.$num.'</span></a>':'').'</th>';
|
||||||
print '<th align="center">'.$langs->trans("DateDue").'</th>';
|
print '<th align="center">'.$langs->trans("DateDue").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("AmountTTC").'</th>';
|
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("Paid").'</th>';
|
print '<th class="right">'.$langs->trans("Paid").'</th>';
|
||||||
print '<th align="center" width="16"> </th>';
|
print '<th align="center" width="16"> </th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($num)
|
if ($num)
|
||||||
@@ -658,18 +658,18 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$chargestatic->getNomUrl(1).'</td>';
|
print '<td>'.$chargestatic->getNomUrl(1).'</td>';
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
print '<td align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
||||||
print '<td align="right">'.price($obj->amount).'</td>';
|
print '<td class="right">'.price($obj->amount).'</td>';
|
||||||
print '<td align="right">'.price($obj->sumpaid).'</td>';
|
print '<td class="right">'.price($obj->sumpaid).'</td>';
|
||||||
print '<td align="center">'.$chargestatic->getLibStatut(3).'</td>';
|
print '<td align="center">'.$chargestatic->getLibStatut(3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$tot_ttc+=$obj->amount;
|
$tot_ttc+=$obj->amount;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right">'.price($tot_ttc).'</td>';
|
print '<td class="right">'.price($tot_ttc).'</td>';
|
||||||
print '<td align="right"></td>';
|
print '<td class="right"></td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -729,9 +729,9 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<th colspan="2">'.$langs->trans("OrdersDeliveredToBill").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=3&billed=0"><span class="badge">'.$num.'</span></a></th>';
|
print '<th colspan="2">'.$langs->trans("OrdersDeliveredToBill").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=3&billed=0"><span class="badge">'.$num.'</span></a></th>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th align="right">'.$langs->trans("AmountHT").'</th>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th class="right">'.$langs->trans("AmountHT").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("AmountTTC").'</th>';
|
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("ToBill").'</th>';
|
print '<th class="right">'.$langs->trans("ToBill").'</th>';
|
||||||
print '<th align="center" width="16"> </th>';
|
print '<th align="center" width="16"> </th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -765,7 +765,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
|||||||
print '<td width="20" class="nobordernopadding nowrap">';
|
print '<td width="20" class="nobordernopadding nowrap">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
print '<td width="16" class="nobordernopadding hideonsmartphone right">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
@@ -777,9 +777,9 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
|||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
print $societestatic->getNomUrl(1, 'customer', 44);
|
print $societestatic->getNomUrl(1, 'customer', 44);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td class="right">'.price($obj->total_ht).'</td>';
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
||||||
print '<td align="right">'.price($obj->total_ttc-$obj->tot_fttc).'</td>';
|
print '<td class="right">'.price($obj->total_ttc-$obj->tot_fttc).'</td>';
|
||||||
print '<td>'.$commandestatic->LibStatut($obj->fk_statut, $obj->facture, 3).'</td>';
|
print '<td>'.$commandestatic->LibStatut($obj->fk_statut, $obj->facture, 3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$tot_ht += $obj->total_ht;
|
$tot_ht += $obj->total_ht;
|
||||||
@@ -790,9 +790,9 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToBill").': '.price($tot_tobill).')</font> </td>';
|
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToBill").': '.price($tot_tobill).')</font> </td>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($tot_ht).'</td>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td class="right">'.price($tot_ht).'</td>';
|
||||||
print '<td align="right">'.price($tot_ttc).'</td>';
|
print '<td class="right">'.price($tot_ttc).'</td>';
|
||||||
print '<td align="right">'.price($tot_tobill).'</td>';
|
print '<td class="right">'.price($tot_tobill).'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
@@ -844,10 +844,10 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("BillsCustomersUnpaid", $num).' <a href="'.DOL_URL_ROOT.'/compta/facture/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th>';
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("BillsCustomersUnpaid", $num).' <a href="'.DOL_URL_ROOT.'/compta/facture/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th>';
|
||||||
print '<th align="right">'.$langs->trans("DateDue").'</th>';
|
print '<th class="right">'.$langs->trans("DateDue").'</th>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th align="right">'.$langs->trans("AmountHT").'</th>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th class="right">'.$langs->trans("AmountHT").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("AmountTTC").'</th>';
|
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("Received").'</th>';
|
print '<th class="right">'.$langs->trans("Received").'</th>';
|
||||||
print '<th width="16"> </th>';
|
print '<th width="16"> </th>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
if ($num)
|
if ($num)
|
||||||
@@ -890,7 +890,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print img_warning($langs->trans("Late"));
|
print img_warning($langs->trans("Late"));
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
print '<td width="16" class="nobordernopadding hideonsmartphone right">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
||||||
@@ -901,10 +901,10 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print '<td class="left">' ;
|
print '<td class="left">' ;
|
||||||
print $societestatic->getNomUrl(1, 'customer', 44);
|
print $societestatic->getNomUrl(1, 'customer', 44);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">'.dol_print_date($db->jdate($obj->datelimite), 'day').'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->datelimite), 'day').'</td>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td class="right">'.price($obj->total_ht).'</td>';
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
||||||
print '<td align="right">'.price($obj->am).'</td>';
|
print '<td class="right">'.price($obj->am).'</td>';
|
||||||
print '<td>'.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3, $obj->am).'</td>';
|
print '<td>'.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3, $obj->am).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -917,9 +917,9 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
|
|
||||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToTake").': '.price($total_ttc-$totalam).')</font> </td>';
|
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToTake").': '.price($total_ttc-$totalam).')</font> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($total).'</td>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td class="right">'.price($total).'</td>';
|
||||||
print '<td align="right">'.price($total_ttc).'</td>';
|
print '<td class="right">'.price($total_ttc).'</td>';
|
||||||
print '<td align="right">'.price($totalam).'</td>';
|
print '<td class="right">'.price($totalam).'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -978,10 +978,10 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("BillsSuppliersUnpaid", $num).' <a href="'.DOL_URL_ROOT.'/fourn/facture/impayees.php"><span class="badge">'.$num.'</span></a></th>';
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("BillsSuppliersUnpaid", $num).' <a href="'.DOL_URL_ROOT.'/fourn/facture/impayees.php"><span class="badge">'.$num.'</span></a></th>';
|
||||||
print '<th align="right">'.$langs->trans("DateDue").'</th>';
|
print '<th class="right">'.$langs->trans("DateDue").'</th>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th align="right">'.$langs->trans("AmountHT").'</th>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th class="right">'.$langs->trans("AmountHT").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("AmountTTC").'</th>';
|
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||||
print '<th align="right">'.$langs->trans("Paid").'</th>';
|
print '<th class="right">'.$langs->trans("Paid").'</th>';
|
||||||
print '<th width="16"> </th>';
|
print '<th width="16"> </th>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$societestatic = new Societe($db);
|
$societestatic = new Societe($db);
|
||||||
@@ -1013,10 +1013,10 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
print $facstatic->getNomUrl(1, '');
|
print $facstatic->getNomUrl(1, '');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$societestatic->getNomUrl(1, 'supplier', 44).'</td>';
|
print '<td>'.$societestatic->getNomUrl(1, 'supplier', 44).'</td>';
|
||||||
print '<td align="right">'.dol_print_date($db->jdate($obj->date_lim_reglement), 'day').'</td>';
|
print '<td class="right">'.dol_print_date($db->jdate($obj->date_lim_reglement), 'day').'</td>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td class="right">'.price($obj->total_ht).'</td>';
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
print '<td class="right">'.price($obj->total_ttc).'</td>';
|
||||||
print '<td align="right">'.price($obj->am).'</td>';
|
print '<td class="right">'.price($obj->am).'</td>';
|
||||||
print '<td>'.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3).'</td>';
|
print '<td>'.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$total += $obj->total_ht;
|
$total += $obj->total_ht;
|
||||||
@@ -1027,9 +1027,9 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
|
|
||||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToPay").': '.price($total_ttc-$totalam).')</font> </td>';
|
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToPay").': '.price($total_ttc-$totalam).')</font> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($total).'</td>';
|
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td class="right">'.price($total).'</td>';
|
||||||
print '<td align="right">'.price($total_ttc).'</td>';
|
print '<td class="right">'.price($total_ttc).'</td>';
|
||||||
print '<td align="right">'.price($totalam).'</td>';
|
print '<td class="right">'.price($totalam).'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,11 +253,13 @@ if (empty($reshook))
|
|||||||
$paiement->amounts = $amounts; // Array with all payments dispatching with invoice id
|
$paiement->amounts = $amounts; // Array with all payments dispatching with invoice id
|
||||||
$paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching
|
$paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching
|
||||||
$paiement->paiementid = dol_getIdFromCode($db, GETPOST('paiementcode'), 'c_paiement', 'code', 'id', 1);
|
$paiement->paiementid = dol_getIdFromCode($db, GETPOST('paiementcode'), 'c_paiement', 'code', 'id', 1);
|
||||||
$paiement->num_paiement = GETPOST('num_paiement');
|
$paiement->num_paiement = GETPOST('num_paiement', 'alpha');
|
||||||
$paiement->note = GETPOST('comment');
|
$paiement->note = GETPOST('comment', 'alpha');
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
|
// Create payment and update this->multicurrency_amounts if this->amounts filled or
|
||||||
|
// this->amounts if this->multicurrency_amounts filled.
|
||||||
$paiement_id = $paiement->create($user, (GETPOST('closepaidinvoices')=='on'?1:0), $thirdparty); // This include closing invoices and regenerating documents
|
$paiement_id = $paiement->create($user, (GETPOST('closepaidinvoices')=='on'?1:0), $thirdparty); // This include closing invoices and regenerating documents
|
||||||
if ($paiement_id < 0)
|
if ($paiement_id < 0)
|
||||||
{
|
{
|
||||||
@@ -583,16 +585,16 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
print '<td align="center">'.$langs->trans('DateMaxPayment').'</td>';
|
print '<td align="center">'.$langs->trans('DateMaxPayment').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td>'.$langs->trans('Currency').'</td>';
|
print '<td>'.$langs->trans('Currency').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
|
||||||
print '<td align="right">'.$multicurrencyalreadypayedlabel.'</td>';
|
print '<td class="right">'.$multicurrencyalreadypayedlabel.'</td>';
|
||||||
print '<td align="right">'.$multicurrencyremaindertopay.'</td>';
|
print '<td class="right">'.$multicurrencyremaindertopay.'</td>';
|
||||||
print '<td align="right">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
print '<td class="right">'.$langs->trans('MulticurrencyPaymentAmount').'</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans('AmountTTC').'</td>';
|
print '<td class="right">'.$langs->trans('AmountTTC').'</td>';
|
||||||
print '<td align="right">'.$alreadypayedlabel.'</td>';
|
print '<td class="right">'.$alreadypayedlabel.'</td>';
|
||||||
print '<td align="right">'.$remaindertopay.'</td>';
|
print '<td class="right">'.$remaindertopay.'</td>';
|
||||||
print '<td align="right">'.$langs->trans('PaymentAmount').'</td>';
|
print '<td class="right">'.$langs->trans('PaymentAmount').'</td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$total=0;
|
$total=0;
|
||||||
@@ -635,7 +637,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
// Date
|
// Date
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($objp->df), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($objp->df), 'day')."</td>\n";
|
||||||
|
|
||||||
// Date Max Payment
|
// Due date
|
||||||
if ($objp->dlr > 0 )
|
if ($objp->dlr > 0 )
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@@ -650,7 +652,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="center"><b>--</b></td>';
|
print '<td align="center"></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currency
|
// Currency
|
||||||
@@ -659,12 +661,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
// Multicurrency Price
|
// Multicurrency Price
|
||||||
if (!empty($conf->multicurrency->enabled))
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) print price($sign * $objp->multicurrency_total_ttc);
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) print price($sign * $objp->multicurrency_total_ttc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Multicurrency Price
|
// Multicurrency Price
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency)
|
||||||
{
|
{
|
||||||
print price($sign * $multicurrency_payment);
|
print price($sign * $multicurrency_payment);
|
||||||
@@ -673,12 +675,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Multicurrency Price
|
// Multicurrency remain to pay
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) print price($sign * $multicurrency_remaintopay);
|
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) print price($sign * $multicurrency_remaintopay);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td class="right nowraponall">';
|
||||||
|
|
||||||
// Add remind multicurrency amount
|
// Add remind multicurrency amount
|
||||||
$namef = 'multicurrency_amount_'.$objp->facid;
|
$namef = 'multicurrency_amount_'.$objp->facid;
|
||||||
@@ -690,12 +692,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
{
|
{
|
||||||
if (!empty($conf->use_javascript_ajax))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'");
|
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'");
|
||||||
print '<input type=hidden class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">';
|
print '<input type="text" class="maxwidth75 multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
||||||
print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
print '<input type="hidden" class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input type="text" size="8" name="'.$namef.'_disabled" value="'.$_POST[$namef].'" disabled>';
|
print '<input type="text" class="maxwidth75" name="'.$namef.'_disabled" value="'.$_POST[$namef].'" disabled>';
|
||||||
print '<input type="hidden" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
print '<input type="hidden" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -703,20 +705,20 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Price
|
// Price
|
||||||
print '<td align="right" '.(($invoice->id==$facid)?' style="font-weight: bold" ':'').'>'.price($sign * $objp->total_ttc).'</td>';
|
print '<td class="right" '.(($invoice->id==$facid)?' style="font-weight: bold" ':'').'>'.price($sign * $objp->total_ttc).'</td>';
|
||||||
|
|
||||||
// Received or paid back
|
// Received or paid back
|
||||||
print '<td align="right">'.price($sign * $paiement);
|
print '<td class="right">'.price($sign * $paiement);
|
||||||
if ($creditnotes) print '+'.price($creditnotes);
|
if ($creditnotes) print '+'.price($creditnotes);
|
||||||
if ($deposits) print '+'.price($deposits);
|
if ($deposits) print '+'.price($deposits);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Remain to take or to pay back
|
// Remain to take or to pay back
|
||||||
print '<td align="right">'.price($sign * $remaintopay).'</td>';
|
print '<td class="right">'.price($sign * $remaintopay).'</td>';
|
||||||
//$test= price(price2num($objp->total_ttc - $paiement - $creditnotes - $deposits));
|
//$test= price(price2num($objp->total_ttc - $paiement - $creditnotes - $deposits));
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<td align="right">';
|
print '<td class="right nowraponall">';
|
||||||
|
|
||||||
// Add remind amount
|
// Add remind amount
|
||||||
$namef = 'amount_'.$objp->facid;
|
$namef = 'amount_'.$objp->facid;
|
||||||
@@ -726,12 +728,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
{
|
{
|
||||||
if (!empty($conf->use_javascript_ajax))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'");
|
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'");
|
||||||
|
print '<input type="text" class="maxwidth75 amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
|
||||||
print '<input type="hidden" class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
print '<input type="hidden" class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
||||||
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input type="text" size="8" name="'.$namef.'_disabled" value="'.dol_escape_htmltag(GETPOST($namef)).'" disabled>';
|
print '<input type="text" class="maxwidth75" name="'.$namef.'_disabled" value="'.dol_escape_htmltag(GETPOST($namef)).'" disabled>';
|
||||||
print '<input type="hidden" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
|
print '<input type="hidden" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@@ -763,21 +765,21 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
{
|
{
|
||||||
// Print total
|
// Print total
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="3" align="left">'.$langs->trans('TotalTTC').'</td>';
|
print '<td colspan="3" class="left">'.$langs->trans('TotalTTC').'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td align="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
||||||
}
|
}
|
||||||
print '<td align="right"><b>'.price($sign * $total_ttc).'</b></td>';
|
print '<td class="right"><b>'.price($sign * $total_ttc).'</b></td>';
|
||||||
print '<td align="right"><b>'.price($sign * $totalrecu);
|
print '<td class="right"><b>'.price($sign * $totalrecu);
|
||||||
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
||||||
if ($totalrecudeposits) print '+'.price($totalrecudeposits);
|
if ($totalrecudeposits) print '+'.price($totalrecudeposits);
|
||||||
print '</b></td>';
|
print '</b></td>';
|
||||||
print '<td align="right"><b>'.price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
print '<td class="right"><b>'.price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
||||||
print '<td align="right" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
print '<td class="right" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
@@ -873,7 +875,7 @@ if (! GETPOST('action', 'aZ09'))
|
|||||||
print_liste_field_titre('Invoice', $_SERVER["PHP_SELF"], 'ref', '', '', '', $sortfield, $sortorder);
|
print_liste_field_titre('Invoice', $_SERVER["PHP_SELF"], 'ref', '', '', '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('Date', $_SERVER["PHP_SELF"], 'dp', '', '', '', $sortfield, $sortorder);
|
print_liste_field_titre('Date', $_SERVER["PHP_SELF"], 'dp', '', '', '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('Type', $_SERVER["PHP_SELF"], 'libelle', '', '', '', $sortfield, $sortorder);
|
print_liste_field_titre('Type', $_SERVER["PHP_SELF"], 'libelle', '', '', '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], 'fa_amount', '', '', 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], 'fa_amount', '', '', '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -885,7 +887,7 @@ if (! GETPOST('action', 'aZ09'))
|
|||||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$objp->facid.'">'.$objp->ref."</a></td>\n";
|
print '<td><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$objp->facid.'">'.$objp->ref."</a></td>\n";
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->dp))."</td>\n";
|
print '<td>'.dol_print_date($db->jdate($objp->dp))."</td>\n";
|
||||||
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement."</td>\n";
|
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement."</td>\n";
|
||||||
print '<td align="right">'.price($objp->amount).'</td><td> </td>';
|
print '<td class="right">'.price($objp->amount).'</td><td> </td>';
|
||||||
|
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printObjectLine', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ class Paiement extends CommonObject
|
|||||||
if ($invoice->type == Facture::TYPE_DEPOSIT)
|
if ($invoice->type == Facture::TYPE_DEPOSIT)
|
||||||
{
|
{
|
||||||
$amount_ht = $amount_tva = $amount_ttc = array();
|
$amount_ht = $amount_tva = $amount_ttc = array();
|
||||||
|
$multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array();
|
||||||
|
|
||||||
// Insert one discount by VAT rate category
|
// Insert one discount by VAT rate category
|
||||||
$discount = new DiscountAbsolute($this->db);
|
$discount = new DiscountAbsolute($this->db);
|
||||||
@@ -384,6 +385,9 @@ class Paiement extends CommonObject
|
|||||||
$amount_ht[$line->tva_tx] += $line->total_ht;
|
$amount_ht[$line->tva_tx] += $line->total_ht;
|
||||||
$amount_tva[$line->tva_tx] += $line->total_tva;
|
$amount_tva[$line->tva_tx] += $line->total_tva;
|
||||||
$amount_ttc[$line->tva_tx] += $line->total_ttc;
|
$amount_ttc[$line->tva_tx] += $line->total_ttc;
|
||||||
|
$multicurrency_amount_ht[$line->tva_tx] += $line->multicurrency_total_ht;
|
||||||
|
$multicurrency_amount_tva[$line->tva_tx] += $line->multicurrency_total_tva;
|
||||||
|
$multicurrency_amount_ttc[$line->tva_tx] += $line->multicurrency_total_ttc;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -392,6 +396,9 @@ class Paiement extends CommonObject
|
|||||||
$discount->amount_ht = abs($amount_ht[$tva_tx]);
|
$discount->amount_ht = abs($amount_ht[$tva_tx]);
|
||||||
$discount->amount_tva = abs($amount_tva[$tva_tx]);
|
$discount->amount_tva = abs($amount_tva[$tva_tx]);
|
||||||
$discount->amount_ttc = abs($amount_ttc[$tva_tx]);
|
$discount->amount_ttc = abs($amount_ttc[$tva_tx]);
|
||||||
|
$discount->multicurrency_amount_ht = abs($multicurrency_amount_ht[$tva_tx]);
|
||||||
|
$discount->multicurrency_amount_tva = abs($multicurrency_amount_tva[$tva_tx]);
|
||||||
|
$discount->multicurrency_amount_ttc = abs($multicurrency_amount_ttc[$tva_tx]);
|
||||||
$discount->tva_tx = abs($tva_tx);
|
$discount->tva_tx = abs($tva_tx);
|
||||||
|
|
||||||
$result = $discount->create($user);
|
$result = $discount->create($user);
|
||||||
@@ -1110,7 +1117,7 @@ class Paiement extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* get the right way of payment
|
* get the right way of payment
|
||||||
*
|
*
|
||||||
* @return string 'dolibarr' if standard comportment or paid in dolibarr currency, 'customer' if payment received from multicurrency inputs
|
* @return string 'dolibarr' if standard comportment or paid in main currency, 'customer' if payment received from multicurrency inputs
|
||||||
*/
|
*/
|
||||||
function getWay()
|
function getWay()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ if ($resql)
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.statut", "", $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -265,9 +265,9 @@ if ($action == 'create')
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
//print '<td>'.$langs->trans("SocialContribution").'</td>';
|
//print '<td>'.$langs->trans("SocialContribution").'</td>';
|
||||||
print '<td class="left">'.$langs->trans("DateDue").'</td>';
|
print '<td class="left">'.$langs->trans("DateDue").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("AlreadyPaid").'</td>';
|
print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("RemainderToPay").'</td>';
|
print '<td class="right">'.$langs->trans("RemainderToPay").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Amount").'</td>';
|
print '<td align="center">'.$langs->trans("Amount").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -282,18 +282,18 @@ if ($action == 'create')
|
|||||||
|
|
||||||
if ($objp->date_ech > 0)
|
if ($objp->date_ech > 0)
|
||||||
{
|
{
|
||||||
print "<td align=\"left\">".dol_print_date($objp->date_ech, 'day')."</td>\n";
|
print '<td class="left">'.dol_print_date($objp->date_ech, 'day').'</td>'."\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\"><b>!!!</b></td>\n";
|
print "<td align=\"center\"><b>!!!</b></td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right">'.price($objp->amount)."</td>";
|
print '<td class="right">'.price($objp->amount)."</td>";
|
||||||
|
|
||||||
print '<td align="right">'.price($sumpaid)."</td>";
|
print '<td class="right">'.price($sumpaid)."</td>";
|
||||||
|
|
||||||
print '<td align="right">'.price($objp->amount - $sumpaid)."</td>";
|
print '<td class="right">'.price($objp->amount - $sumpaid)."</td>";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($sumpaid < $objp->amount)
|
if ($sumpaid < $objp->amount)
|
||||||
@@ -322,10 +322,10 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
// Print total
|
// Print total
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td colspan="2" align="left">'.$langs->trans("Total").':</td>';
|
print '<td colspan="2" class="left">'.$langs->trans("Total").':</td>';
|
||||||
print "<td align=\"right\"><b>".price($total_ttc)."</b></td>";
|
print '<td class="right"><b>'.price($total_ttc).'</b></td>';
|
||||||
print "<td align=\"right\"><b>".price($totalrecu)."</b></td>";
|
print '<td class="right"><b>'.price($totalrecu).'</b></td>';
|
||||||
print "<td align=\"right\"><b>".price($total_ttc - $totalrecu)."</b></td>";
|
print '<td class="right"><b>'.price($total_ttc - $totalrecu).'</b></td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,10 +109,10 @@ if ($id > 0)
|
|||||||
if (! empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER["PHP_SELF"], "f.datef", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER["PHP_SELF"], "f.datef", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
print '<td>'.$langs->trans("Element").'</td>';
|
print '<td>'.$langs->trans("Element").'</td>';
|
||||||
print '<td>'.$langs->trans("Status").'</td>';
|
print '<td>'.$langs->trans("Status").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Debit").'</td>';
|
print '<td class="right">'.$langs->trans("Debit").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Credit").'</td>';
|
print '<td class="right">'.$langs->trans("Credit").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Balance").'</td>';
|
print '<td class="right">'.$langs->trans("Balance").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Author").'</td>';
|
print '<td class="right">'.$langs->trans("Author").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$TData = array();
|
$TData = array();
|
||||||
@@ -261,18 +261,18 @@ if ($id > 0)
|
|||||||
|
|
||||||
print '<td aling="left">'.$data['status'].'</td>';
|
print '<td aling="left">'.$data['status'].'</td>';
|
||||||
|
|
||||||
print '<td align="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n";
|
print '<td class="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n";
|
||||||
|
|
||||||
$totalDebit += ($data['amount'] > 0) ? abs($data['amount']) : 0;
|
$totalDebit += ($data['amount'] > 0) ? abs($data['amount']) : 0;
|
||||||
|
|
||||||
print '<td align="right">'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."</td>\n";
|
print '<td class="right">'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."</td>\n";
|
||||||
$totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']);
|
$totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']);
|
||||||
|
|
||||||
// Balance
|
// Balance
|
||||||
print '<td align="right">'.price($data['balance'])."</td>\n";
|
print '<td class="right">'.price($data['balance'])."</td>\n";
|
||||||
|
|
||||||
// Author
|
// Author
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
print $data['author'];
|
print $data['author'];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -281,9 +281,9 @@ if ($id > 0)
|
|||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="3"> </td>';
|
print '<td colspan="3"> </td>';
|
||||||
print '<td align="right">'.price($totalDebit).'</td>';
|
print '<td class="right">'.price($totalDebit).'</td>';
|
||||||
print '<td align="right">'.price($totalCredit).'</td>';
|
print '<td class="right">'.price($totalCredit).'</td>';
|
||||||
print '<td align="right">'.price(price2num($totalDebit - $totalCredit, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num($totalDebit - $totalCredit, 'MT')).'</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
// Get cpts of category/group
|
// Get cpts of category/group
|
||||||
$cpts = $AccCat->getCptsCat(0, $tmppredefinedgroupwhere);
|
$cpts = $AccCat->getCptsCat(0, $tmppredefinedgroupwhere);
|
||||||
|
|
||||||
foreach($cpts as $i => $cpt)
|
foreach($cpts as $j => $cpt)
|
||||||
{
|
{
|
||||||
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cpt['dc']);
|
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cpt['dc']);
|
||||||
if ($return < 0) {
|
if ($return < 0) {
|
||||||
|
|||||||
@@ -922,7 +922,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
if($mois>12) {$annee_decalage=$annee+1;}
|
if($mois>12) {$annee_decalage=$annee+1;}
|
||||||
$case = strftime("%Y-%m", dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage));
|
$case = strftime("%Y-%m", dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage));
|
||||||
|
|
||||||
print '<td align="right"> ';
|
print '<td class="right"> ';
|
||||||
if ($modecompta == 'BOOKKEEPING')
|
if ($modecompta == 'BOOKKEEPING')
|
||||||
{
|
{
|
||||||
if (isset($decaiss[$case]) && $decaiss[$case] != 0)
|
if (isset($decaiss[$case]) && $decaiss[$case] != 0)
|
||||||
@@ -943,7 +943,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print '<td align="right" class="borderrightlight"> ';
|
print '<td class="borderrightlight right"> ';
|
||||||
if ($modecompta == 'BOOKKEEPING')
|
if ($modecompta == 'BOOKKEEPING')
|
||||||
{
|
{
|
||||||
if (isset($encaiss[$case]))
|
if (isset($encaiss[$case]))
|
||||||
@@ -978,8 +978,8 @@ print '</td>';
|
|||||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||||
{
|
{
|
||||||
$nbcols+=2;
|
$nbcols+=2;
|
||||||
print '<td align="right">'.(isset($totsorties[$annee])?price(price2num($totsorties[$annee], 'MT')):' ').'</td>';
|
print '<td class="right">'.(isset($totsorties[$annee])?price(price2num($totsorties[$annee], 'MT')):' ').'</td>';
|
||||||
print '<td align="right" style="border-right: 1px solid #DDD">'.(isset($totentrees[$annee])?price(price2num($totentrees[$annee], 'MT')):' ').'</td>';
|
print '<td class="right" style="border-right: 1px solid #DDD">'.(isset($totentrees[$annee])?price(price2num($totentrees[$annee], 'MT')):' ').'</td>';
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -993,7 +993,7 @@ print "</tr>\n";
|
|||||||
print '<tr class="liste_total"><td>'.$langs->trans("AccountingResult").'</td>';
|
print '<tr class="liste_total"><td>'.$langs->trans("AccountingResult").'</td>';
|
||||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||||
{
|
{
|
||||||
print '<td align="right" colspan="2" class="borderrightlight"> ';
|
print '<td colspan="2" class="borderrightlight right"> ';
|
||||||
if (isset($totentrees[$annee]) || isset($totsorties[$annee]))
|
if (isset($totentrees[$annee]) || isset($totsorties[$annee]))
|
||||||
{
|
{
|
||||||
$in=(isset($totentrees[$annee])?price2num($totentrees[$annee], 'MT'):0);
|
$in=(isset($totentrees[$annee])?price2num($totentrees[$annee], 'MT'):0);
|
||||||
|
|||||||
@@ -228,18 +228,18 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th class="liste_titre">'.$langs->trans("AccountingCategory").'</th>';
|
print '<th class="liste_titre">'.$langs->trans("AccountingCategory").'</th>';
|
||||||
print '<th class="liste_titre"></th>';
|
print '<th class="liste_titre"></th>';
|
||||||
print '<th class="liste_titre" align="right">'.$langs->trans("PreviousPeriod").'</th>';
|
print '<th class="liste_titre right">'.$langs->trans("PreviousPeriod").'</th>';
|
||||||
print '<th class="liste_titre" align="right">'.$langs->trans("SelectedPeriod").'</th>';
|
print '<th class="liste_titre right">'.$langs->trans("SelectedPeriod").'</th>';
|
||||||
foreach($months as $k => $v){
|
foreach($months as $k => $v){
|
||||||
if (($k+1) >= $date_startmonth)
|
if (($k+1) >= $date_startmonth)
|
||||||
{
|
{
|
||||||
print '<th class="liste_titre width50" align="right" >'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach($months as $k => $v){
|
foreach($months as $k => $v){
|
||||||
if (($k+1) < $date_startmonth)
|
if (($k+1) < $date_startmonth)
|
||||||
{
|
{
|
||||||
print '<th class="liste_titre width50" align="right" >'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@@ -405,7 +405,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
// N-1
|
// N-1
|
||||||
if (! empty($arrayofaccountforfilter))
|
if (! empty($arrayofaccountforfilter))
|
||||||
{
|
{
|
||||||
$return = $AccCat->getSumDebitCredit($arrayofaccountforfilter, $date_start_previous, $date_end_previous, $cpt['dc']?$cpt['dc']:0);
|
$return = $AccCat->getSumDebitCredit($arrayofaccountforfilter, $date_start_previous, $date_end_previous, $cat['dc']?$cat['dc']:0);
|
||||||
|
|
||||||
if ($return < 0) {
|
if ($return < 0) {
|
||||||
setEventMessages(null, $AccCat->errors, 'errors');
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
@@ -438,7 +438,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
if (($k+1) < $start_month) $yeartoprocess++;
|
if (($k+1) < $start_month) $yeartoprocess++;
|
||||||
|
|
||||||
//var_dump($monthtoprocess.'_'.$yeartoprocess);
|
//var_dump($monthtoprocess.'_'.$yeartoprocess);
|
||||||
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cpt['dc']?$cpt['dc']:0, 'nofilter', $monthtoprocess, $yeartoprocess);
|
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cat['dc']?$cat['dc']:0, 'nofilter', $monthtoprocess, $yeartoprocess);
|
||||||
if ($return < 0) {
|
if ($return < 0) {
|
||||||
setEventMessages(null, $AccCat->errors, 'errors');
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
$resultM=0;
|
$resultM=0;
|
||||||
@@ -493,15 +493,15 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right">' . price($totCat['NP']) . '</td>';
|
print '<td class="right">' . price($totCat['NP']) . '</td>';
|
||||||
print '<td align="right">' . price($totCat['N']) . '</td>';
|
print '<td class="right">' . price($totCat['N']) . '</td>';
|
||||||
|
|
||||||
// Each month
|
// Each month
|
||||||
foreach($totCat['M'] as $k => $v){
|
foreach($totCat['M'] as $k => $v){
|
||||||
if (($k+1) >= $date_startmonth) print '<td align="right">' . price($v) . '</td>';
|
if (($k+1) >= $date_startmonth) print '<td class="right">' . price($v) . '</td>';
|
||||||
}
|
}
|
||||||
foreach($totCat['M'] as $k => $v){
|
foreach($totCat['M'] as $k => $v){
|
||||||
if (($k+1) < $date_startmonth) print '<td align="right">' . price($v) . '</td>';
|
if (($k+1) < $date_startmonth) print '<td class="right">' . price($v) . '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@@ -523,8 +523,8 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
print ' - ';
|
print ' - ';
|
||||||
print $cpt['account_label'];
|
print $cpt['account_label'];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">' . price($resultNP) . '</td>';
|
print '<td class="right">' . price($resultNP) . '</td>';
|
||||||
print '<td align="right">' . price($resultN) . '</td>';
|
print '<td class="right">' . price($resultN) . '</td>';
|
||||||
|
|
||||||
// Make one call for each month
|
// Make one call for each month
|
||||||
foreach($months as $k => $v)
|
foreach($months as $k => $v)
|
||||||
@@ -532,7 +532,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
if (($k+1) >= $date_startmonth)
|
if (($k+1) >= $date_startmonth)
|
||||||
{
|
{
|
||||||
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
||||||
print '<td align="right">' . price($resultM) . '</td>';
|
print '<td class="right">' . price($resultM) . '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach($months as $k => $v)
|
foreach($months as $k => $v)
|
||||||
@@ -540,7 +540,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
if (($k+1) < $date_startmonth)
|
if (($k+1) < $date_startmonth)
|
||||||
{
|
{
|
||||||
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
||||||
print '<td align="right">' . price($resultM) . '</td>';
|
print '<td class="right">' . price($resultM) . '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@@ -194,9 +194,9 @@ if ($result)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -204,11 +204,11 @@ if ($result)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -269,8 +269,8 @@ if ($result)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Amount
|
// Amount
|
||||||
print "<td align=\"right\">".price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount).'</td>';
|
||||||
print "<td></td>";
|
print '<td></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$total = $total + $obj->amount;
|
$total = $total + $obj->amount;
|
||||||
@@ -281,7 +281,7 @@ if ($result)
|
|||||||
$colspan=5;
|
$colspan=5;
|
||||||
if (! empty($conf->banque->enabled)) $colspan++;
|
if (! empty($conf->banque->enabled)) $colspan++;
|
||||||
print '<tr class="liste_total"><td colspan="'.$colspan.'" class="liste_total">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="'.$colspan.'" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||||
print '<td class="liste_total" align="right">'.price($total)."</td>";
|
print '<td class="liste_total right">'.price($total)."</td>";
|
||||||
print "<td></td></tr>";
|
print "<td></td></tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@@ -218,9 +218,9 @@ print '<div class="div-table-responsive-no-min">';
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre" height="24">';
|
print '<tr class="liste_titre" height="24">';
|
||||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Number").'</td>';
|
print '<td class="right">'.$langs->trans("Number").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("AmountTotal").'</td>';
|
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("AmountAverage").'</td>';
|
print '<td class="right">'.$langs->trans("AmountAverage").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$oldyear=0;
|
$oldyear=0;
|
||||||
@@ -234,17 +234,17 @@ foreach ($data as $val)
|
|||||||
|
|
||||||
print '<tr class="oddeven" height="24">';
|
print '<tr class="oddeven" height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'">'.$oldyear.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'">'.$oldyear.'</a></td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven" height="24">';
|
print '<tr class="oddeven" height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a></td>';
|
||||||
print '<td align="right">'.$val['nb'].'</td>';
|
print '<td class="right">'.$val['nb'].'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$oldyear=$year;
|
$oldyear=$year;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ if ($id > 0)
|
|||||||
print $langs->trans('PaymentMode');
|
print $langs->trans('PaymentMode');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editmode')
|
if ($action != 'editmode')
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editmode') {
|
if ($action == 'editmode') {
|
||||||
@@ -555,7 +555,7 @@ if ($id > 0)
|
|||||||
print $langs->trans('BankAccount');
|
print $langs->trans('BankAccount');
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($action != 'editbankaccount' && $user->rights->tax->charges->creer)
|
if ($action != 'editbankaccount' && $user->rights->tax->charges->creer)
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editbankaccount') {
|
if ($action == 'editbankaccount') {
|
||||||
@@ -608,9 +608,9 @@ if ($id > 0)
|
|||||||
print '<td>'.$langs->trans("Date").'</td>';
|
print '<td>'.$langs->trans("Date").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
if (! empty($conf->banque->enabled)) {
|
if (! empty($conf->banque->enabled)) {
|
||||||
print '<td class="liste_titre" align="right">' . $langs->trans('BankAccount') . '</td>';
|
print '<td class="liste_titre right">' . $langs->trans('BankAccount') . '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
@@ -639,12 +639,12 @@ if ($id > 0)
|
|||||||
$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($bankaccountstatic->id)
|
if ($bankaccountstatic->id)
|
||||||
print $bankaccountstatic->getNomUrl(1, 'transactions');
|
print $bankaccountstatic->getNomUrl(1, 'transactions');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price($objp->amount)."</td>\n";
|
print '<td class="right">'.price($objp->amount)."</td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$totalpaye += $objp->amount;
|
$totalpaye += $objp->amount;
|
||||||
$i++;
|
$i++;
|
||||||
@@ -658,14 +658,14 @@ if ($id > 0)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("AlreadyPaid")." :</td><td align=\"right\">".price($totalpaye)."</td></tr>\n";
|
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AlreadyPaid")." :</td><td class=\"right\">".price($totalpaye)."</td></tr>\n";
|
||||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("AmountExpected")." :</td><td align=\"right\">".price($object->amount)."</td></tr>\n";
|
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AmountExpected")." :</td><td class=\"right\">".price($object->amount)."</td></tr>\n";
|
||||||
|
|
||||||
$resteapayer = $object->amount - $totalpaye;
|
$resteapayer = $object->amount - $totalpaye;
|
||||||
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||||
|
|
||||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("RemainderToPay")." :</td>";
|
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay")." :</td>";
|
||||||
print '<td align="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n";
|
print '<td class="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|||||||
@@ -203,17 +203,17 @@ if ($resql)
|
|||||||
// Period end date
|
// Period end date
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
print '<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
// Status
|
// Status
|
||||||
print '<td class="liste_titre maxwidthonsmartphone" align="right">';
|
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||||
$liststatus=array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid"));
|
$liststatus=array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid"));
|
||||||
print $form->selectarray('search_status', $liststatus, $search_status, 1);
|
print $form->selectarray('search_status', $liststatus, $search_status, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -221,12 +221,12 @@ if ($resql)
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "id", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "id", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "cs.libelle", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "cs.libelle", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "periode", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "periode", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DateDue", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DateDue", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cs.paye", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cs.paye", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<td align="right" width="100">'.price($obj->amount).'</td>';
|
print '<td class="right" width="100">'.price($obj->amount).'</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
||||||
$totalarray['totalttc'] += $obj->amount;
|
$totalarray['totalttc'] += $obj->amount;
|
||||||
@@ -275,7 +275,7 @@ if ($resql)
|
|||||||
// Due date
|
// Due date
|
||||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
||||||
|
|
||||||
print '<td align="right" class="nowrap">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
print '<td class="nowrap right">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
||||||
|
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ if ($resql)
|
|||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td align="right">'.price($totalarray['totalttc']).'</td>';
|
print '<td class="right">'.price($totalarray['totalttc']).'</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
|||||||
@@ -122,8 +122,8 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print_liste_field_titre("LabelContrib", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("LabelContrib", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("TypeContrib", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("TypeContrib", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$sql = "SELECT c.id, c.libelle as lib,";
|
$sql = "SELECT c.id, c.libelle as lib,";
|
||||||
@@ -187,9 +187,9 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
if (empty($date)) $date=$obj->date_ech;
|
if (empty($date)) $date=$obj->date_ech;
|
||||||
print '<td>'.dol_print_date($date, 'day').'</td>';
|
print '<td>'.dol_print_date($date, 'day').'</td>';
|
||||||
// Expected to pay
|
// Expected to pay
|
||||||
print '<td align="right">'.price($obj->total).'</td>';
|
print '<td class="right">'.price($obj->total).'</td>';
|
||||||
// Paid
|
// Paid
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($obj->totalpaye) print price($obj->totalpaye);
|
if ($obj->totalpaye) print price($obj->totalpaye);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@@ -200,11 +200,11 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right" class="liste_total"></td>'; // A total here has no sense
|
print '<td class="liste_total right"></td>'; // A total here has no sense
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
print '<td align="right" class="liste_total">'.price($totalpaye)."</td>";
|
print '<td class="liste_total right">'.price($totalpaye)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -246,10 +246,10 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@@ -263,7 +263,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
|
|
||||||
print "<td>".$obj->label."</td>\n";
|
print "<td>".$obj->label."</td>\n";
|
||||||
|
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
|
|
||||||
// Ref payment
|
// Ref payment
|
||||||
$tva_static->id=$obj->rowid;
|
$tva_static->id=$obj->rowid;
|
||||||
@@ -271,16 +271,16 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
||||||
|
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n";
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right">'.price($total).'</td>';
|
print '<td class="right">'.price($total).'</td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="right">'.price($total)."</td>";
|
print '<td class="right">'.price($total)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@@ -347,10 +347,10 @@ while($j<$numlt)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@@ -364,7 +364,7 @@ while($j<$numlt)
|
|||||||
|
|
||||||
print "<td>".$obj->label."</td>\n";
|
print "<td>".$obj->label."</td>\n";
|
||||||
|
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
|
|
||||||
// Ref payment
|
// Ref payment
|
||||||
$tva_static->id=$obj->rowid;
|
$tva_static->id=$obj->rowid;
|
||||||
@@ -372,16 +372,16 @@ while($j<$numlt)
|
|||||||
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
||||||
|
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right">'.price($total)."</td>";
|
print '<td class="right">'.price($total)."</td>";
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="right">'.price($total)."</td>";
|
print '<td class="right">'.price($total)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@@ -428,10 +428,10 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "s.dateep", "", $param, 'width="140px"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "s.dateep", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "s.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "s.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@@ -446,7 +446,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
|||||||
|
|
||||||
print "<td>".$obj->label."</td>\n";
|
print "<td>".$obj->label."</td>\n";
|
||||||
|
|
||||||
print '<td align="right">'.($obj->salary?price($obj->salary):'')."</td>";
|
print '<td class="right">'.($obj->salary?price($obj->salary):'')."</td>";
|
||||||
|
|
||||||
// Ref payment
|
// Ref payment
|
||||||
$sal_static->id=$obj->rowid;
|
$sal_static->id=$obj->rowid;
|
||||||
@@ -454,16 +454,16 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
|||||||
print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n";
|
print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n";
|
||||||
|
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
|
||||||
print '<td align="right">'.price($obj->amount)."</td>";
|
print '<td class="right">'.price($obj->amount)."</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right"></td>'; // A total here has no sense
|
print '<td class="right"></td>'; // A total here has no sense
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="center"> </td>';
|
print '<td align="center"> </td>';
|
||||||
print '<td align="right">'.price($total)."</td>";
|
print '<td class="right">'.price($total)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@@ -257,10 +257,10 @@ while($i < 12)
|
|||||||
{
|
{
|
||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<td width="60" align="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
print '<td width="60" class="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||||
|
|
||||||
$sql = "SELECT fd.tva_tx AS vatrate,";
|
$sql = "SELECT fd.tva_tx AS vatrate,";
|
||||||
$sql .= " fd.product_type AS product_type,";
|
$sql .= " fd.product_type AS product_type,";
|
||||||
@@ -301,10 +301,10 @@ if ($resql) {
|
|||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||||
print '<td align="right" width="6%">' . price($obj->$monthj) . '</td>';
|
print '<td class="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||||
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
||||||
}
|
}
|
||||||
print '<td align="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
print '<td class="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||||
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -318,9 +318,9 @@ if ($resql) {
|
|||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||||
print '<td align="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
print '<td class="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
print '<td class="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
print $db->lasterror(); // Show last sql error
|
print $db->lasterror(); // Show last sql error
|
||||||
@@ -335,10 +335,10 @@ while($i < 12)
|
|||||||
{
|
{
|
||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<td width="60" align="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
print '<td width="60" class="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||||
|
|
||||||
$sql2 = "SELECT ffd.tva_tx AS vatrate,";
|
$sql2 = "SELECT ffd.tva_tx AS vatrate,";
|
||||||
$sql2 .= " ffd.product_type AS product_type,";
|
$sql2 .= " ffd.product_type AS product_type,";
|
||||||
@@ -380,10 +380,10 @@ if ($resql2) {
|
|||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||||
print '<td align="right" width="6%">' . price($obj->$monthj) . '</td>';
|
print '<td class="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||||
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
||||||
}
|
}
|
||||||
print '<td align="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
print '<td class="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||||
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -397,9 +397,9 @@ if ($resql2) {
|
|||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||||
print '<td align="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
print '<td class="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
print '<td class="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
print $db->lasterror(); // Show last sql error
|
print $db->lasterror(); // Show last sql error
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
$form->select_type_of_lines(isset($selected_type)?$selected_type:-1, 'search_type', 1, 1, 1);
|
$form->select_type_of_lines(isset($selected_type)?$selected_type:-1, 'search_type', 1, 1, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td colspan="5" align="right">';
|
print '<td colspan="5" class="right">';
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ print_liste_field_titre(
|
|||||||
"qty",
|
"qty",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -347,7 +347,7 @@ print_liste_field_titre(
|
|||||||
"qty",
|
"qty",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -356,8 +356,8 @@ print_liste_field_titre(
|
|||||||
$_SERVER["PHP_SELF"],
|
$_SERVER["PHP_SELF"],
|
||||||
"amount",
|
"amount",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$classslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -367,7 +367,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -377,7 +377,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -400,15 +400,15 @@ print_liste_field_titre(
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Quantity
|
// Quantity
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
print $qty[$key];
|
print $qty[$key];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent;
|
// Percent;
|
||||||
print '<td align="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
print '<td class="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
||||||
|
|
||||||
// Amount w/o VAT
|
// Amount w/o VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
/*if ($key > 0) {
|
/*if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||||
} else {
|
} else {
|
||||||
@@ -419,7 +419,7 @@ print_liste_field_titre(
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount with VAT
|
// Amount with VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
/*if ($key > 0) {
|
/*if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||||
} else {
|
} else {
|
||||||
@@ -430,7 +430,7 @@ print_liste_field_titre(
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent;
|
// Percent;
|
||||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||||
|
|
||||||
// TODO: statistics?
|
// TODO: statistics?
|
||||||
|
|
||||||
@@ -441,11 +441,11 @@ print_liste_field_titre(
|
|||||||
// Total
|
// Total
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td>'.$langs->trans("Total").'</td>';
|
print '<td>'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right">'.$qtytotal.'</td>';
|
print '<td class="right">'.$qtytotal.'</td>';
|
||||||
print '<td align="right">100%</td>';
|
print '<td class="right">100%</td>';
|
||||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||||
print '<td align="right">'.price($catotal).'</td>';
|
print '<td class="right">'.price($catotal).'</td>';
|
||||||
print '<td align="right">100%</td>';
|
print '<td class="right">100%</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
"amount_ht",
|
"amount_ht",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -323,7 +323,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -332,7 +332,7 @@ print_liste_field_titre(
|
|||||||
$_SERVER["PHP_SELF"], "amount_ttc",
|
$_SERVER["PHP_SELF"], "amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -391,7 +391,7 @@ if (count($amount)) {
|
|||||||
print "<td>".$linkname."</td>\n";
|
print "<td>".$linkname."</td>\n";
|
||||||
|
|
||||||
// Amount w/o VAT
|
// Amount w/o VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($modecompta != 'CREANCES-DETTES')
|
if ($modecompta != 'CREANCES-DETTES')
|
||||||
{
|
{
|
||||||
if ($key > 0) {
|
if ($key > 0) {
|
||||||
@@ -410,7 +410,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount with VAT
|
// Amount with VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
if ($key > 0) {
|
if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
|
||||||
@@ -428,7 +428,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent
|
// Percent
|
||||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||||
|
|
||||||
// Other stats
|
// Other stats
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@@ -452,9 +452,9 @@ if (count($amount)) {
|
|||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
print '<td colspan="1"></td>';
|
print '<td colspan="1"></td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price($catotal).'</td>';
|
print '<td class="right">'.price($catotal).'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@@ -378,22 +378,22 @@ if ($subcat) {
|
|||||||
print ' checked';
|
print ' checked';
|
||||||
}
|
}
|
||||||
print'></td>';
|
print'></td>';
|
||||||
print '<td colspan="7" align="right">';
|
print '<td colspan="7" class="right">';
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
|
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
|
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
|
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print $form->select_country($search_country, 'search_country');
|
print $form->select_country($search_country, 'search_country');
|
||||||
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
|
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -448,7 +448,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
"amount_ht",
|
"amount_ht",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -461,7 +461,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -471,7 +471,7 @@ print_liste_field_titre(
|
|||||||
"amount_ttc",
|
"amount_ttc",
|
||||||
"",
|
"",
|
||||||
$paramslink,
|
$paramslink,
|
||||||
'align="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
@@ -567,7 +567,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount w/o VAT
|
// Amount w/o VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
if ($key > 0) {
|
if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
||||||
@@ -585,7 +585,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount with VAT
|
// Amount with VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
if ($key > 0) {
|
if ($key > 0) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
||||||
@@ -604,7 +604,7 @@ if (count($amount)) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent;
|
// Percent;
|
||||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||||
|
|
||||||
// Other stats
|
// Other stats
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@@ -631,9 +631,9 @@ if (count($amount)) {
|
|||||||
if ($modecompta != 'CREANCES-DETTES') {
|
if ($modecompta != 'CREANCES-DETTES') {
|
||||||
print '<td colspan="1"></td>';
|
print '<td colspan="1"></td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price($catotal).'</td>';
|
print '<td class="right">'.price($catotal).'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@@ -285,9 +285,9 @@ print '</tr>';
|
|||||||
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Month").'</td>';
|
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Month").'</td>';
|
||||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||||
{
|
{
|
||||||
if ($modecompta == 'CREANCES-DETTES') print '<td class="liste_titre" align="right">'.$langs->trans("AmountHT").'</td>';
|
if ($modecompta == 'CREANCES-DETTES') print '<td class="liste_titre right">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td class="liste_titre" align="right">'.$langs->trans("AmountTTC").'</td>';
|
print '<td class="liste_titre right">'.$langs->trans("AmountTTC").'</td>';
|
||||||
print '<td class="liste_titre" align="right" class="borderrightlight">'.$langs->trans("Delta").'</td>';
|
print '<td class="liste_titre right borderrightlight">'.$langs->trans("Delta").'</td>';
|
||||||
if ($annee != $year_end) print '<td class="liste_titre" width="15"> </td>';
|
if ($annee != $year_end) print '<td class="liste_titre" width="15"> </td>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@@ -322,7 +322,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
{
|
{
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
// Valeur CA du mois w/o VAT
|
// Valeur CA du mois w/o VAT
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($cum_ht[$case])
|
if ($cum_ht[$case])
|
||||||
{
|
{
|
||||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||||
@@ -337,7 +337,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Valeur CA du mois
|
// Valeur CA du mois
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($cum[$case])
|
if ($cum[$case])
|
||||||
{
|
{
|
||||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||||
@@ -359,29 +359,29 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
{
|
{
|
||||||
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev], 4)*100);
|
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev], 4)*100);
|
||||||
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
||||||
print '<td align="right" class="borderrightlight">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
print '<td class="borderrightlight right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||||
}
|
}
|
||||||
if ($cum[$caseprev] && ! $cum[$case])
|
if ($cum[$caseprev] && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">-100%</td>';
|
print '<td class="borderrightlight right">-100%</td>';
|
||||||
}
|
}
|
||||||
if (! $cum[$caseprev] && $cum[$case])
|
if (! $cum[$caseprev] && $cum[$case])
|
||||||
{
|
{
|
||||||
//print '<td align="right">+Inf%</td>';
|
//print '<td class="right">+Inf%</td>';
|
||||||
print '<td align="right" class="borderrightlight">-</td>';
|
print '<td class="borderrightlight right">-</td>';
|
||||||
}
|
}
|
||||||
if (isset($cum[$caseprev]) && ! $cum[$caseprev] && ! $cum[$case])
|
if (isset($cum[$caseprev]) && ! $cum[$caseprev] && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">+0%</td>';
|
print '<td class="borderrightlight right">+0%</td>';
|
||||||
}
|
}
|
||||||
if (! isset($cum[$caseprev]) && ! $cum[$case])
|
if (! isset($cum[$caseprev]) && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">-</td>';
|
print '<td class="borderrightlight right">-</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">';
|
print '<td class="borderrightlight right">';
|
||||||
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
||||||
else { print ' '; }
|
else { print ' '; }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -410,7 +410,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
$caseprev = dol_print_date(dol_mktime(1,1,1,$mois,1,$annee-1),"%Y-%m");
|
$caseprev = dol_print_date(dol_mktime(1,1,1,$mois,1,$annee-1),"%Y-%m");
|
||||||
|
|
||||||
// Valeur CA du mois
|
// Valeur CA du mois
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($cum[$case])
|
if ($cum[$case])
|
||||||
{
|
{
|
||||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||||
@@ -429,25 +429,25 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
|||||||
{
|
{
|
||||||
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100);
|
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100);
|
||||||
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
||||||
print '<td align="right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
print '<td class="right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($cum[$caseprev] && ! $cum[$case])
|
if ($cum[$caseprev] && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right">-100%</td>';
|
print '<td class="right">-100%</td>';
|
||||||
}
|
}
|
||||||
if (! $cum[$caseprev] && $cum[$case])
|
if (! $cum[$caseprev] && $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right">+Inf%</td>';
|
print '<td class="right">+Inf%</td>';
|
||||||
}
|
}
|
||||||
if (! $cum[$caseprev] && ! $cum[$case])
|
if (! $cum[$caseprev] && ! $cum[$case])
|
||||||
{
|
{
|
||||||
print '<td align="right">+0%</td>';
|
print '<td class="right">+0%</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
||||||
else { print ' '; }
|
else { print ' '; }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -469,7 +469,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
|||||||
// Montant total HT
|
// Montant total HT
|
||||||
if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
||||||
{
|
{
|
||||||
print '<td align="right" class="nowrap">'.($total_ht[$annee]?price($total_ht[$annee]):"0")."</td>";
|
print '<td class="nowrap right">'.($total_ht[$annee]?price($total_ht[$annee]):"0")."</td>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -480,7 +480,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
|||||||
// Montant total
|
// Montant total
|
||||||
if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
||||||
{
|
{
|
||||||
print '<td align="right" class="nowrap">'.($total[$annee]?price($total[$annee]):"0")."</td>";
|
print '<td class="nowrap right">'.($total[$annee]?price($total[$annee]):"0")."</td>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -492,24 +492,24 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
|||||||
{
|
{
|
||||||
if ($total[$annee-1] && $total[$annee]) {
|
if ($total[$annee-1] && $total[$annee]) {
|
||||||
$percent=(round(($total[$annee]-$total[$annee-1])/$total[$annee-1], 4)*100);
|
$percent=(round(($total[$annee]-$total[$annee-1])/$total[$annee-1], 4)*100);
|
||||||
print '<td align="right" class="nowrap borderrightlight">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
print '<td class="nowrap borderrightlight right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||||
}
|
}
|
||||||
if ($total[$annee-1] && ! $total[$annee])
|
if ($total[$annee-1] && ! $total[$annee])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">-100%</td>';
|
print '<td class="borderrightlight right">-100%</td>';
|
||||||
}
|
}
|
||||||
if (! $total[$annee-1] && $total[$annee])
|
if (! $total[$annee-1] && $total[$annee])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">+'.$langs->trans('Inf').'%</td>';
|
print '<td class="borderrightlight right">+'.$langs->trans('Inf').'%</td>';
|
||||||
}
|
}
|
||||||
if (! $total[$annee-1] && ! $total[$annee])
|
if (! $total[$annee-1] && ! $total[$annee])
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">+0%</td>';
|
print '<td class="borderrightlight right">+0%</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right" class="borderrightlight">';
|
print '<td class="borderrightlight right">';
|
||||||
if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; }
|
if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; }
|
||||||
else { print ' '; }
|
else { print ' '; }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -567,7 +567,7 @@ print '</div>';
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Facture a encaisser : </i></td><td align=\"right\"><i>".price($total_ttc_Rac)."</i></td><td colspan=\"5\"><-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es</td></tr>";
|
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Facture a encaisser : </i></td><td class=\"right\"><i>".price($total_ttc_Rac)."</i></td><td colspan=\"5\"><-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es</td></tr>";
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
@@ -616,7 +616,7 @@ print '</div>';
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Signe et non facture:</i></td><td align=\"right\"><i>".price($total_pr)."</i></td><td colspan=\"5\"><-- bug ici, ca devrait exclure le deja facture</td></tr>";
|
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Signe et non facture:</i></td><td class=\"right\"><i>".price($total_pr)."</i></td><td colspan=\"5\"><-- bug ici, ca devrait exclure le deja facture</td></tr>";
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
@@ -624,7 +624,7 @@ print '</div>';
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Total CA previsionnel : </i></td><td align=\"right\"><i>".price($total_CA)."</i></td><td colspan=\"3\"><-- bug ici car bug sur les 2 precedents</td></tr>";
|
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Total CA previsionnel : </i></td><td class=\"right\"><i>".price($total_CA)."</i></td><td colspan=\"3\"><-- bug ici car bug sur les 2 precedents</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
@@ -351,15 +351,15 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
|
print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
|
||||||
if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">'.$langs->trans("DatePayment").'</td>';
|
if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">'.$langs->trans("DatePayment").'</td>';
|
||||||
else print '<td></td>';
|
else print '<td></td>';
|
||||||
print '<td align="right">'.$namerate.'</td>';
|
print '<td class="right">'.$namerate.'</td>';
|
||||||
print '<td class="left">'.$productcust.'</td>';
|
print '<td class="left">'.$productcust.'</td>';
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.$amountcust.'</td>';
|
print '<td class="right">'.$amountcust.'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
||||||
print '<td align="right">'.$vatcust.'</td>';
|
print '<td class="right">'.$vatcust.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$action = "tvadetail";
|
$action = "tvadetail";
|
||||||
@@ -414,7 +414,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||||
|
|
||||||
// Invoice date
|
// Invoice date
|
||||||
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
||||||
@@ -424,7 +424,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
else print '<td></td>';
|
else print '<td></td>';
|
||||||
|
|
||||||
// Rate
|
// Rate
|
||||||
print '<td align="right">' . $fields['drate'] . '</td>';
|
print '<td class="right">' . $fields['drate'] . '</td>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
@@ -464,7 +464,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total HT
|
// Total HT
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
print price($fields['totalht']);
|
print price($fields['totalht']);
|
||||||
if (price2num($fields['ftotal_ttc']))
|
if (price2num($fields['ftotal_ttc']))
|
||||||
{
|
{
|
||||||
@@ -479,7 +479,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$ratiopaymentinvoice=1;
|
$ratiopaymentinvoice=1;
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
||||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||||
{
|
{
|
||||||
@@ -503,13 +503,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Total collected
|
// Total collected
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_ht, 'MT'), 1);
|
print price(price2num($temp_ht, 'MT'), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_vat, 'MT'), 1);
|
print price(price2num($temp_vat, 'MT'), 1);
|
||||||
//print price($fields['vat']);
|
//print price($fields['vat']);
|
||||||
@@ -524,13 +524,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total customers for this vat rate
|
// Total customers for this vat rate
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -538,13 +538,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
{
|
{
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -560,11 +560,11 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<td class="left">'.$namesup.'</td>';
|
print '<td class="left">'.$namesup.'</td>';
|
||||||
print '<td class="left">'.$productsup.'</td>';
|
print '<td class="left">'.$productsup.'</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td align="right">'.$amountsup.'</td>';
|
print '<td class="right">'.$amountsup.'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
|
||||||
print '<td align="right">'.$vatsup.'</td>';
|
print '<td class="right">'.$vatsup.'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
foreach (array_keys($x_paye) as $thirdparty_id)
|
foreach (array_keys($x_paye) as $thirdparty_id)
|
||||||
@@ -607,7 +607,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||||
|
|
||||||
// Invoice date
|
// Invoice date
|
||||||
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
||||||
@@ -657,7 +657,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total HT
|
// Total HT
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
print price($fields['totalht']);
|
print price($fields['totalht']);
|
||||||
if (price2num($fields['ftotal_ttc']))
|
if (price2num($fields['ftotal_ttc']))
|
||||||
{
|
{
|
||||||
@@ -672,7 +672,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$ratiopaymentinvoice=1;
|
$ratiopaymentinvoice=1;
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||||
{
|
{
|
||||||
$paymentfourn_static->id=$fields['payment_id'];
|
$paymentfourn_static->id=$fields['payment_id'];
|
||||||
@@ -698,13 +698,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VAT paid
|
// VAT paid
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_ht, 'MT'), 1);
|
print price(price2num($temp_ht, 'MT'), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_vat, 'MT'), 1);
|
print price(price2num($temp_vat, 'MT'), 1);
|
||||||
//print price($fields['vat']);
|
//print price($fields['vat']);
|
||||||
@@ -719,26 +719,26 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total suppliers for this vat rate
|
// Total suppliers for this vat rate
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,7 +750,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$diff = $x_coll_sum - $x_paye_sum;
|
$diff = $x_coll_sum - $x_paye_sum;
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
||||||
print '<td class="liste_total nowrap" align="right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
|
print '<td class="liste_total nowrap right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ function pt($db, $sql, $date)
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="nowrap">'.$date.'</td>';
|
print '<td class="nowrap">'.$date.'</td>';
|
||||||
print '<td align="right">'.$langs->trans("ClaimedForThisPeriod").'</td>';
|
print '<td class="right">'.$langs->trans("ClaimedForThisPeriod").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("PaidDuringThisPeriod").'</td>';
|
print '<td class="right">'.$langs->trans("PaidDuringThisPeriod").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$totalclaimed = 0;
|
$totalclaimed = 0;
|
||||||
@@ -122,8 +122,8 @@ function pt($db, $sql, $date)
|
|||||||
{
|
{
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
||||||
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
print '<td class="nowrap right">'.price($amountclaimed)."</td>\n";
|
||||||
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
print '<td class="nowrap right">'.price($amountpaid)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$amountclaimed = 0;
|
$amountclaimed = 0;
|
||||||
@@ -145,8 +145,8 @@ function pt($db, $sql, $date)
|
|||||||
{
|
{
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowrap">'.$obj->dm."</td>\n";
|
print '<td class="nowrap">'.$obj->dm."</td>\n";
|
||||||
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
print '<td class="nowrap right">'.price($amountclaimed)."</td>\n";
|
||||||
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
print '<td class="nowrap right">'.price($amountpaid)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$amountclaimed = 0;
|
$amountclaimed = 0;
|
||||||
$amountpaid = 0;
|
$amountpaid = 0;
|
||||||
@@ -166,8 +166,8 @@ function pt($db, $sql, $date)
|
|||||||
{
|
{
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
||||||
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
print '<td class="nowrap right">'.price($amountclaimed)."</td>\n";
|
||||||
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
print '<td class="nowrap right">'.price($amountpaid)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$amountclaimed = 0;
|
$amountclaimed = 0;
|
||||||
@@ -175,9 +175,9 @@ function pt($db, $sql, $date)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td align="right">'.$langs->trans("Total").'</td>';
|
print '<td class="right">'.$langs->trans("Total").'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price($totalclaimed).'</td>';
|
print '<td class="nowrap right">'.price($totalclaimed).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price($totalpaid).'</td>';
|
print '<td class="nowrap right">'.price($totalpaid).'</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@@ -242,9 +242,9 @@ print load_fiche_titre($langs->trans("VATSummary"), '', '');
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="30%">'.$langs->trans("Year")." ".$y.'</td>';
|
print '<td width="30%">'.$langs->trans("Year")." ".$y.'</td>';
|
||||||
print '<td align="right">'.$langs->trans("VATToPay").'</td>';
|
print '<td class="right">'.$langs->trans("VATToPay").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("VATToCollect").'</td>';
|
print '<td class="right">'.$langs->trans("VATToCollect").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Balance").'</td>';
|
print '<td class="right">'.$langs->trans("Balance").'</td>';
|
||||||
print '<td> </td>'."\n";
|
print '<td> </td>'."\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
@@ -444,7 +444,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
|||||||
$x_coll_sum += $temp_vat;
|
$x_coll_sum += $temp_vat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "<td class=\"nowrap\" align=\"right\">".price(price2num($x_coll_sum, 'MT'))."</td>";
|
print '<td class="nowrap right">'.price(price2num($x_coll_sum, 'MT')).'</td>';
|
||||||
|
|
||||||
$x_paye_sum = 0;
|
$x_paye_sum = 0;
|
||||||
foreach (array_keys($x_paye) as $rate)
|
foreach (array_keys($x_paye) as $rate)
|
||||||
@@ -488,7 +488,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
|||||||
$x_paye_sum += $temp_vat;
|
$x_paye_sum += $temp_vat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "<td class=\"nowrap\" align=\"right\">".price(price2num($x_paye_sum, 'MT'))."</td>";
|
print '<td class="nowrap right">'.price(price2num($x_paye_sum, 'MT')).'</td>';
|
||||||
|
|
||||||
$subtotalcoll = $subtotalcoll + $x_coll_sum;
|
$subtotalcoll = $subtotalcoll + $x_coll_sum;
|
||||||
$subtotalpaye = $subtotalpaye + $x_paye_sum;
|
$subtotalpaye = $subtotalpaye + $x_paye_sum;
|
||||||
@@ -497,7 +497,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
|||||||
$total = $total + $diff;
|
$total = $total + $diff;
|
||||||
$subtotal = price2num($subtotal + $diff, 'MT');
|
$subtotal = price2num($subtotal + $diff, 'MT');
|
||||||
|
|
||||||
print "<td class=\"nowrap\" align=\"right\">".price(price2num($diff, 'MT'))."</td>\n";
|
print '<td class="nowrap right">'.price(price2num($diff, 'MT')).'</td>'."\n";
|
||||||
print "<td> </td>\n";
|
print "<td> </td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -505,16 +505,16 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
|||||||
if ($i > 2)
|
if ($i > 2)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.round($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
print '<td class="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.round($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalcoll, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtotalcoll, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalpaye, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtotalpaye, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtotal, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtotal, 'MT')).'</td>';
|
||||||
print '<td> </td></tr>';
|
print '<td> </td></tr>';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$subtotalcoll=0; $subtotalpaye=0; $subtotal=0;
|
$subtotalcoll=0; $subtotalpaye=0; $subtotal=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("TotalToPay").':</td><td class="nowrap" align="right">'.price(price2num($total, 'MT')).'</td>';
|
print '<tr class="liste_total"><td class="right" colspan="3">'.$langs->trans("TotalToPay").':</td><td class="nowrap right">'.price(price2num($total, 'MT')).'</td>';
|
||||||
print "<td> </td>\n";
|
print "<td> </td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -575,19 +575,19 @@ if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td align="right">' . $langs->trans("VATDue") . '</td>';
|
print '<td class="right">' . $langs->trans("VATDue") . '</td>';
|
||||||
print '<td class="nowrap" align="right">' . price(price2num($total, 'MT')) . '</td>';
|
print '<td class="nowrap right">' . price(price2num($total, 'MT')) . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td align="right">' . $langs->trans("VATPaid") . '</td>';
|
print '<td class="right">' . $langs->trans("VATPaid") . '</td>';
|
||||||
print '<td class="nowrap" align="right">' . price(price2num($obj->mm, 'MT')) . "</td>\n";
|
print '<td class="nowrap right">' . price(price2num($obj->mm, 'MT')) . "</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$restopay = $total - $obj->mm;
|
$restopay = $total - $obj->mm;
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td align="right">' . $langs->trans("RemainToPay") . '</td>';
|
print '<td class="right">' . $langs->trans("RemainToPay") . '</td>';
|
||||||
print '<td class="nowrap" align="right">' . price(price2num($restopay, 'MT')) . '</td>';
|
print '<td class="nowrap right">' . price(price2num($restopay, 'MT')) . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@@ -188,8 +188,8 @@ if ($result)
|
|||||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
|
print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -200,9 +200,9 @@ if ($result)
|
|||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "t.label", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "t.label", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "t.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "t.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "t.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "t.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (! empty($conf->banque->enabled)) print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "t.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "t.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ if ($result)
|
|||||||
$colspan=5;
|
$colspan=5;
|
||||||
if (! empty($conf->banque->enabled)) $colspan++;
|
if (! empty($conf->banque->enabled)) $colspan++;
|
||||||
print '<tr class="liste_total"><td colspan="'.$colspan.'">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="'.$colspan.'">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right">'.price($total).'</td>';
|
print '<td class="right">'.price($total).'</td>';
|
||||||
print "<td> </td></tr>";
|
print "<td> </td></tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@@ -280,7 +280,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@@ -344,11 +344,11 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<td class="left">'.$productcust.'</td>';
|
print '<td class="left">'.$productcust.'</td>';
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.$amountcust.'</td>';
|
print '<td class="right">'.$amountcust.'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
||||||
print '<td align="right">'.$vatcust.'</td>';
|
print '<td class="right">'.$vatcust.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$action = "tvadetail";
|
$action = "tvadetail";
|
||||||
@@ -390,7 +390,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||||
|
|
||||||
// Invoice date
|
// Invoice date
|
||||||
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
||||||
@@ -440,7 +440,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total HT
|
// Total HT
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
print price($fields['totalht']);
|
print price($fields['totalht']);
|
||||||
if (price2num($fields['ftotal_ttc']))
|
if (price2num($fields['ftotal_ttc']))
|
||||||
{
|
{
|
||||||
@@ -455,7 +455,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$ratiopaymentinvoice=1;
|
$ratiopaymentinvoice=1;
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
||||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||||
{
|
{
|
||||||
@@ -479,13 +479,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Total collected
|
// Total collected
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_ht, 'MT'), 1);
|
print price(price2num($temp_ht, 'MT'), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_vat, 'MT'), 1);
|
print price(price2num($temp_vat, 'MT'), 1);
|
||||||
//print price($fields['vat']);
|
//print price($fields['vat']);
|
||||||
@@ -500,13 +500,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total customers for this vat rate
|
// Total customers for this vat rate
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -514,13 +514,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
{
|
{
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -536,11 +536,11 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<td class="left">'.$namesup.'</td>';
|
print '<td class="left">'.$namesup.'</td>';
|
||||||
print '<td class="left">'.$productsup.'</td>';
|
print '<td class="left">'.$productsup.'</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td align="right">'.$amountsup.'</td>';
|
print '<td class="right">'.$amountsup.'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
|
print '<td class="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
|
||||||
print '<td align="right">'.$vatsup.'</td>';
|
print '<td class="right">'.$vatsup.'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
foreach (array_keys($x_paye) as $rate)
|
foreach (array_keys($x_paye) as $rate)
|
||||||
@@ -571,7 +571,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||||
|
|
||||||
// Invoice date
|
// Invoice date
|
||||||
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
||||||
@@ -621,7 +621,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total HT
|
// Total HT
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
print price($fields['totalht']);
|
print price($fields['totalht']);
|
||||||
if (price2num($fields['ftotal_ttc']))
|
if (price2num($fields['ftotal_ttc']))
|
||||||
{
|
{
|
||||||
@@ -636,7 +636,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$ratiopaymentinvoice=1;
|
$ratiopaymentinvoice=1;
|
||||||
if ($modetax != 1)
|
if ($modetax != 1)
|
||||||
{
|
{
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||||
{
|
{
|
||||||
$paymentfourn_static->id=$fields['payment_id'];
|
$paymentfourn_static->id=$fields['payment_id'];
|
||||||
@@ -662,13 +662,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VAT paid
|
// VAT paid
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_ht, 'MT'), 1);
|
print price(price2num($temp_ht, 'MT'), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap right">';
|
||||||
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
||||||
print price(price2num($temp_vat, 'MT'), 1);
|
print price(price2num($temp_vat, 'MT'), 1);
|
||||||
//print price($fields['vat']);
|
//print price($fields['vat']);
|
||||||
@@ -683,26 +683,26 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
// Total suppliers for this vat rate
|
// Total suppliers for this vat rate
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="4"></td>';
|
print '<td colspan="4"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||||
if ($modetax != 1) {
|
if ($modetax != 1) {
|
||||||
print '<td class="nowrap" align="right"> </td>';
|
print '<td class="nowrap right"> </td>';
|
||||||
print '<td align="right"> </td>';
|
print '<td class="right"> </td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -714,7 +714,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
|||||||
$diff = $x_coll_sum - $x_paye_sum;
|
$diff = $x_coll_sum - $x_paye_sum;
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
||||||
print '<td class="liste_total nowrap" align="right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
|
print '<td class="liste_total nowrap right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td>
|
<td class="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table><br>
|
</table><br>
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" align="center">
|
<td colspan="4" class="center">
|
||||||
<input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">
|
<input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">
|
||||||
<input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
|
<input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -590,7 +590,7 @@ else
|
|||||||
$rowspan=3;
|
$rowspan=3;
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
|
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
|
||||||
|
|
||||||
print '<td valign="middle" align="center" rowspan="'.$rowspan.'">';
|
print '<td class="valignmiddle center" rowspan="'.$rowspan.'">';
|
||||||
print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a>';
|
print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@@ -766,7 +766,7 @@ else
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" name="add" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" name="add" value="'.$langs->trans("Add").'">';
|
||||||
@@ -1107,7 +1107,7 @@ else
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||||
@@ -1239,7 +1239,7 @@ else
|
|||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 3;
|
$cols = 3;
|
||||||
$parameyers=array('socid'=>$socid);
|
$parameters=array('socid'=>$socid);
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
$object->load_ref_elements();
|
$object->load_ref_elements();
|
||||||
@@ -1300,7 +1300,7 @@ else
|
|||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
print '<div style="clear:both"></div>';
|
print '<div style="clear:both"></div>';
|
||||||
|
|
||||||
print dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
// Barre d'actions
|
// Barre d'actions
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|||||||
@@ -372,25 +372,25 @@ if ($sql_select)
|
|||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" name="sref" size="8" value="'.$sref.'">';
|
print '<input class="flat" type="text" name="sref" size="8" value="'.$sref.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre nowrap center">'; // date
|
print '<td class="liste_titre nowrap center">'; // date
|
||||||
print $formother->select_month($month?$month:-1, 'month', 1, 0, 'valignmiddle');
|
print $formother->select_month($month?$month:-1, 'month', 1, 0, 'valignmiddle');
|
||||||
$formother->select_year($year?$year:-1, 'year', 1, 20, 1);
|
$formother->select_year($year?$year:-1, 'year', 1, 20, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre center">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.dol_escape_htmltag($sprod_fulldescr).'">';
|
print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.dol_escape_htmltag($sprod_fulldescr).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center">'; // TODO: Add filters !
|
print '<td class="liste_titre center">'; // TODO: Add filters !
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre center">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre center">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -398,14 +398,14 @@ if ($sql_select)
|
|||||||
|
|
||||||
// Titles with sort buttons
|
// Titles with sort buttons
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'align="center" width="150"', $sortfield, $sortorder);
|
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'width="150"', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('ContactType', $_SERVER['PHP_SELF'], '', '', $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre('ContactType', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre('TotalHT', $_SERVER['PHP_SELF'], 'total_ht', '', $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('TotalHT', $_SERVER['PHP_SELF'], 'total_ht', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre('UnitPrice', $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('UnitPrice', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -427,10 +427,10 @@ if ($sql_select)
|
|||||||
print '<td class="nobordernopadding nowrap" width="100">';
|
print '<td class="nobordernopadding nowrap" width="100">';
|
||||||
print $documentstatic->getNomUrl(1);
|
print $documentstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center" width="80">'.dol_print_date($db->jdate($objp->dateprint), 'day').'</td>';
|
print '<td class="center" width="80">'.dol_print_date($db->jdate($objp->dateprint), 'day').'</td>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($type_element == 'contract')
|
if ($type_element == 'contract')
|
||||||
{
|
{
|
||||||
print $documentstaticline->getLibStatut(2);
|
print $documentstaticline->getLibStatut(2);
|
||||||
@@ -488,7 +488,8 @@ if ($sql_select)
|
|||||||
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
|
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($objp->info_bits & 2) == 2) {
|
if (($objp->info_bits & 2) == 2)
|
||||||
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'">';
|
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'">';
|
||||||
$txt='';
|
$txt='';
|
||||||
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
|
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
|
||||||
@@ -589,13 +590,13 @@ if ($sql_select)
|
|||||||
//print '<td class="left">'.$prodreftxt.'</td>';
|
//print '<td class="left">'.$prodreftxt.'</td>';
|
||||||
print '<td>'.$objp->libelle.'</td>';
|
print '<td>'.$objp->libelle.'</td>';
|
||||||
|
|
||||||
print '<td align="right">'.$objp->prod_qty.'</td>';
|
print '<td class="right">'.$objp->prod_qty.'</td>';
|
||||||
$total_qty+=$objp->prod_qty;
|
$total_qty+=$objp->prod_qty;
|
||||||
|
|
||||||
print '<td align="right">'.price($objp->total_ht).'</td>';
|
print '<td class="right">'.price($objp->total_ht).'</td>';
|
||||||
$total_ht+=$objp->total_ht;
|
$total_ht+=$objp->total_ht;
|
||||||
|
|
||||||
print '<td align="right">'.price($objp->total_ht/(empty($objp->prod_qty)?1:$objp->prod_qty)).'</td>';
|
print '<td class="right">'.price($objp->total_ht/(empty($objp->prod_qty)?1:$objp->prod_qty)).'</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
@@ -605,9 +606,9 @@ if ($sql_select)
|
|||||||
print '<td>' . $langs->trans('Total') . '</td>';
|
print '<td>' . $langs->trans('Total') . '</td>';
|
||||||
print '<td colspan="3"></td>';
|
print '<td colspan="3"></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td align="right">' . $total_qty . '</td>';
|
print '<td class="right">' . $total_qty . '</td>';
|
||||||
print '<td align="right">' . price($total_ht) . '</td>';
|
print '<td class="right">' . price($total_ht) . '</td>';
|
||||||
print '<td align="right">' . price($total_ht/(empty($total_qty)?1:$total_qty)) . '</td>';
|
print '<td class="right">' . price($total_ht/(empty($total_qty)?1:$total_qty)) . '</td>';
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
@@ -615,26 +616,23 @@ if ($sql_select)
|
|||||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
} elseif (empty($type_element) || $type_element == -1) {
|
||||||
elseif (empty($type_element) || $type_element == -1)
|
|
||||||
{
|
|
||||||
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
||||||
|
|
||||||
print '<table class="liste" width="100%">'."\n";
|
print '<table class="liste" width="100%">'."\n";
|
||||||
// Titles with sort buttons
|
// Titles with sort buttons
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'align="center" width="150"', $sortfield, $sortorder);
|
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'width="150"', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_status', '', $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_status', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td class="opacitymedium" colspan="5">'.$langs->trans("SelectElementAndClick", $langs->transnoentitiesnoconv("Search")).'</td></tr>';
|
print '<tr class="oddeven"><td class="opacitymedium" colspan="5">'.$langs->trans("SelectElementAndClick", $langs->transnoentitiesnoconv("Search")).'</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
||||||
|
|
||||||
print '<table class="liste" width="100%">'."\n";
|
print '<table class="liste" width="100%">'."\n";
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -82,7 +83,7 @@ $search_town=GETPOST('search_town', 'alpha');
|
|||||||
$search_import_key=GETPOST("search_import_key", "alpha");
|
$search_import_key=GETPOST("search_import_key", "alpha");
|
||||||
$search_country=GETPOST("search_country", 'intcomma');
|
$search_country=GETPOST("search_country", 'intcomma');
|
||||||
|
|
||||||
if ($search_status=='') $search_status=1; // always display activ customer first
|
if ($search_status=='') $search_status=1; // always display active customer first
|
||||||
|
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
|
|
||||||
@@ -404,15 +405,15 @@ $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas';
|
|||||||
llxHeader('', $title, $help_url);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
$param.='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
$param.='&begin='.urlencode($begin).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
||||||
$param.='&type='.urlencode($type).'&view='.urlencode($view);
|
$param.='&type='.urlencode($type).'&view='.urlencode($view);
|
||||||
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
|
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
|
||||||
if (!empty($search_categ_thirdparty)) $param.='&search_categ_thirdparty='.urlencode($search_categ_thirdparty);
|
if (!empty($search_categ_thirdparty)) $param.='&search_categ_thirdparty='.urlencode($search_categ_thirdparty);
|
||||||
if (!empty($search_categ_supplier)) $param.='&search_categ_supplier='.urlencode($search_categ_supplier);
|
if (!empty($search_categ_supplier)) $param.='&search_categ_supplier='.urlencode($search_categ_supplier);
|
||||||
if ($sall != '') $param.='&sall='.urlencode($sall);
|
if ($sall != '') $param.='&sall='.urlencode($sall);
|
||||||
if ($search_id > 0) $param.= "&search_id=".urlencode($search_id);
|
if ($search_id > 0) $param.= "&search_id=".urlencode($search_id);
|
||||||
if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname);
|
if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname);
|
||||||
if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname);
|
if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname);
|
||||||
if ($search_societe != '') $param.='&search_societe='.urlencode($search_societe);
|
if ($search_societe != '') $param.='&search_societe='.urlencode($search_societe);
|
||||||
@@ -426,9 +427,9 @@ if ($search_phone_mobile != '') $param.='&search_phone_mobile='.urlencode($s
|
|||||||
if ($search_fax != '') $param.='&search_fax='.urlencode($search_fax);
|
if ($search_fax != '') $param.='&search_fax='.urlencode($search_fax);
|
||||||
if ($search_email != '') $param.='&search_email='.urlencode($search_email);
|
if ($search_email != '') $param.='&search_email='.urlencode($search_email);
|
||||||
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
||||||
if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv);
|
if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv);
|
||||||
if ($search_import_key != '') $param.='&search_import_key='.urlencode($search_import_key);
|
if ($search_import_key != '') $param.='&search_import_key='.urlencode($search_import_key);
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||||
@@ -576,7 +577,7 @@ if (! empty($arrayfields['p.town']['checked']))
|
|||||||
// Country
|
// Country
|
||||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre center">';
|
||||||
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth100');
|
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth100');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@@ -642,7 +643,7 @@ if (! empty($arrayfields['p.thirdparty']['checked']))
|
|||||||
}
|
}
|
||||||
if (! empty($arrayfields['p.priv']['checked']))
|
if (! empty($arrayfields['p.priv']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre center">';
|
||||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||||
print $form->selectarray('search_priv', $selectarray, $search_priv, 1);
|
print $form->selectarray('search_priv', $selectarray, $search_priv, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -680,7 +681,7 @@ if (! empty($arrayfields['p.import_key']['checked']))
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterButtons();
|
$searchpicto=$form->showFilterButtons();
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -697,7 +698,9 @@ if (! empty($arrayfields['p.zip']['checked'])) print_liste_field
|
|||||||
if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($arrayfields['p.town']['label'], $_SERVER["PHP_SELF"], "p.town", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($arrayfields['p.town']['label'], $_SERVER["PHP_SELF"], "p.town", $begin, $param, '', $sortfield, $sortorder);
|
||||||
//if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
|
//if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
|
||||||
//if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder);
|
//if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['country.code_iso']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
}
|
||||||
if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder);
|
||||||
@@ -708,18 +711,31 @@ if (! empty($arrayfields['p.twitter']['checked'])) print_liste_field
|
|||||||
if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'], $_SERVER["PHP_SELF"], "p.facebook", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'], $_SERVER["PHP_SELF"], "p.facebook", $begin, $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.linkedin']['checked'])) print_liste_field_titre($arrayfields['p.linkedin']['label'], $_SERVER["PHP_SELF"], "p.linkedin", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.linkedin']['checked'])) print_liste_field_titre($arrayfields['p.linkedin']['label'], $_SERVER["PHP_SELF"], "p.linkedin", $begin, $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'], $_SERVER["PHP_SELF"], "s.nom", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'], $_SERVER["PHP_SELF"], "s.nom", $begin, $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, '', $sortfield, $sortorder, 'center ');
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
$parameters = array(
|
||||||
|
'arrayfields'=>$arrayfields,
|
||||||
|
'param'=>$param,
|
||||||
|
'sortfield'=>$sortfield,
|
||||||
|
'sortorder'=>$sortorder,
|
||||||
|
);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.datec']['checked'])) {
|
||||||
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, 'align="center"', $sortfield, $sortorder);
|
}
|
||||||
if (! empty($arrayfields['p.import_key']['checked'])) print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.tms']['checked'])) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
}
|
||||||
|
if (! empty($arrayfields['p.statut']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
}
|
||||||
|
if (! empty($arrayfields['p.import_key']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
}
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -798,7 +814,7 @@ while ($i < min($num, $limit))
|
|||||||
// Country
|
// Country
|
||||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
$tmparray=getCountry($obj->fk_pays, 'all');
|
$tmparray=getCountry($obj->fk_pays, 'all');
|
||||||
print $tmparray['label'];
|
print $tmparray['label'];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -884,7 +900,7 @@ while ($i < min($num, $limit))
|
|||||||
// Private/Public
|
// Private/Public
|
||||||
if (! empty($arrayfields['p.priv']['checked']))
|
if (! empty($arrayfields['p.priv']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">'.$contactstatic->LibPubPriv($obj->priv).'</td>';
|
print '<td class="center">'.$contactstatic->LibPubPriv($obj->priv).'</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -897,7 +913,7 @@ while ($i < min($num, $limit))
|
|||||||
// Date creation
|
// Date creation
|
||||||
if (! empty($arrayfields['p.datec']['checked']))
|
if (! empty($arrayfields['p.datec']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
@@ -905,7 +921,7 @@ while ($i < min($num, $limit))
|
|||||||
// Date modification
|
// Date modification
|
||||||
if (! empty($arrayfields['p.tms']['checked']))
|
if (! empty($arrayfields['p.tms']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
@@ -913,7 +929,7 @@ while ($i < min($num, $limit))
|
|||||||
// Status
|
// Status
|
||||||
if (! empty($arrayfields['p.statut']['checked']))
|
if (! empty($arrayfields['p.statut']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">'.$contactstatic->getLibStatut(3).'</td>';
|
print '<td class="center">'.$contactstatic->getLibStatut(3).'</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['p.import_key']['checked']))
|
if (! empty($arrayfields['p.import_key']['checked']))
|
||||||
@@ -925,7 +941,7 @@ while ($i < min($num, $limit))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap" align="center">';
|
print '<td class="nowrap center">';
|
||||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
{
|
{
|
||||||
$selected=0;
|
$selected=0;
|
||||||
|
|||||||
@@ -157,13 +157,13 @@ if ($action == 'edit')
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Photo
|
// Photo
|
||||||
print '<td align="center" class="hideonsmartphone" valign="middle" rowspan="6">';
|
print '<td class="center hideonsmartphone valignmiddle" rowspan="6">';
|
||||||
print $form->showphoto('contact', $object)."\n";
|
print $form->showphoto('contact', $object)."\n";
|
||||||
if ($object->photo) print "<br>\n";
|
if ($object->photo) print "<br>\n";
|
||||||
|
|
||||||
print '<table class="nobordernopadding">';
|
print '<table class="nobordernopadding">';
|
||||||
|
|
||||||
if ($object->photo) print '<tr><td align="center"><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
|
if ($object->photo) print '<tr><td class="center"><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
||||||
print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>';
|
print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@@ -1563,14 +1563,14 @@ else
|
|||||||
print '<tr class="liste_titre'.($cursorline?' liste_titre_add':'').'">';
|
print '<tr class="liste_titre'.($cursorline?' liste_titre_add':'').'">';
|
||||||
print '<td>'.$langs->trans("ServiceNb", $cursorline).'</td>';
|
print '<td>'.$langs->trans("ServiceNb", $cursorline).'</td>';
|
||||||
print '<td width="80" align="center">'.$langs->trans("VAT").'</td>';
|
print '<td width="80" align="center">'.$langs->trans("VAT").'</td>';
|
||||||
print '<td width="80" align="right">'.$langs->trans("PriceUHT").'</td>';
|
print '<td width="80" class="right">'.$langs->trans("PriceUHT").'</td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td width="80" align="right">'.$langs->trans("PriceUHTCurrency").'</td>';
|
print '<td width="80" class="right">'.$langs->trans("PriceUHTCurrency").'</td>';
|
||||||
}
|
}
|
||||||
print '<td width="30" align="center">'.$langs->trans("Qty").'</td>';
|
print '<td width="30" align="center">'.$langs->trans("Qty").'</td>';
|
||||||
if ($conf->global->PRODUCT_USE_UNITS) print '<td width="30" align="left">'.$langs->trans("Unit").'</td>';
|
if ($conf->global->PRODUCT_USE_UNITS) print '<td width="30" class="left">'.$langs->trans("Unit").'</td>';
|
||||||
print '<td width="50" align="right">'.$langs->trans("ReductionShort").'</td>';
|
print '<td width="50" class="right">'.$langs->trans("ReductionShort").'</td>';
|
||||||
if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print '<td width="50" align="right">'.$langs->trans("BuyingPrice").'</td>';
|
if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print '<td width="50" class="right">'.$langs->trans("BuyingPrice").'</td>';
|
||||||
print '<td width="30"> </td>';
|
print '<td width="30"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@@ -1618,10 +1618,10 @@ else
|
|||||||
print vatrate($objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), '%', $objp->info_bits);
|
print vatrate($objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), '%', $objp->info_bits);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Price
|
// Price
|
||||||
print '<td align="right">'.($objp->subprice != '' ? price($objp->subprice) : '')."</td>\n";
|
print '<td class="right">'.($objp->subprice != '' ? price($objp->subprice) : '')."</td>\n";
|
||||||
// Price multicurrency
|
// Price multicurrency
|
||||||
if (!empty($conf->multicurrency->enabled)) {
|
if (!empty($conf->multicurrency->enabled)) {
|
||||||
print '<td align="right" class="linecoluht_currency nowrap">'.price($objp->multicurrency_subprice).'</td>';
|
print '<td class="linecoluht_currency nowrap right">'.price($objp->multicurrency_subprice).'</td>';
|
||||||
}
|
}
|
||||||
// Quantite
|
// Quantite
|
||||||
print '<td align="center">'.$objp->qty.'</td>';
|
print '<td align="center">'.$objp->qty.'</td>';
|
||||||
@@ -1630,7 +1630,7 @@ else
|
|||||||
// Remise
|
// Remise
|
||||||
if ($objp->remise_percent > 0)
|
if ($objp->remise_percent > 0)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.$objp->remise_percent."%</td>\n";
|
print '<td class="right">'.$objp->remise_percent."%</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1641,7 +1641,7 @@ else
|
|||||||
if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print '<td align="right" class="nowrap">'.price($objp->pa_ht).'</td>';
|
if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print '<td align="right" class="nowrap">'.price($objp->pa_ht).'</td>';
|
||||||
|
|
||||||
// Icon move, update et delete (statut contrat 0=brouillon,1=valide,2=ferme)
|
// Icon move, update et delete (statut contrat 0=brouillon,1=valide,2=ferme)
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td class="nowrap right">';
|
||||||
if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0))
|
if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0))
|
||||||
{
|
{
|
||||||
print '<!-- link to move service line into another contract -->';
|
print '<!-- link to move service line into another contract -->';
|
||||||
@@ -1746,10 +1746,10 @@ else
|
|||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
print $form->load_tva("eltva_tx", $objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), $mysoc, $object->thirdparty, $objp->fk_product, $objp->info_bits, $objp->product_type, 0, 1);
|
print $form->load_tva("eltva_tx", $objp->tva_tx.($objp->vat_src_code?(' ('.$objp->vat_src_code.')'):''), $mysoc, $object->thirdparty, $objp->fk_product, $objp->info_bits, $objp->product_type, 0, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input size="5" type="text" name="elprice" value="'.price($objp->subprice).'"></td>';
|
print '<td class="right"><input size="5" type="text" name="elprice" value="'.price($objp->subprice).'"></td>';
|
||||||
print '<td align="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
|
print '<td align="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
|
||||||
if ($conf->global->PRODUCT_USE_UNITS)
|
if ($conf->global->PRODUCT_USE_UNITS)
|
||||||
{
|
{
|
||||||
@@ -1757,10 +1757,10 @@ else
|
|||||||
print $form->selectUnits($objp->fk_unit, "unit");
|
print $form->selectUnits($objp->fk_unit, "unit");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right" class="nowrap"><input size="1" type="text" name="elremise_percent" value="'.$objp->remise_percent.'">%</td>';
|
print '<td class="nowrap right"><input size="1" type="text" name="elremise_percent" value="'.$objp->remise_percent.'">%</td>';
|
||||||
if (! empty($usemargins))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($objp->fk_product) print '<select id="fournprice" name="fournprice"></select>';
|
if ($objp->fk_product) print '<select id="fournprice" name="fournprice"></select>';
|
||||||
print '<input id="buying_price" type="text" size="5" name="buying_price" value="'.price($objp->pa_ht, 0, '', 0).'"></td>';
|
print '<input id="buying_price" type="text" size="5" name="buying_price" value="'.price($objp->pa_ht, 0, '', 0).'"></td>';
|
||||||
}
|
}
|
||||||
@@ -1880,7 +1880,7 @@ else
|
|||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).'</td>';
|
print '<td>'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).'</td>';
|
||||||
print '<td width="30" align="right">';
|
print '<td width="30" class="right">';
|
||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
{
|
{
|
||||||
if ($object->statut > 0 && $action != 'activateline' && $action != 'unactivateline')
|
if ($object->statut > 0 && $action != 'activateline' && $action != 'unactivateline')
|
||||||
|
|||||||
@@ -156,11 +156,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<div class="refidno">';
|
$morehtmlref.='<div class="refidno">';
|
||||||
// Ref customer
|
// Ref customer
|
||||||
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, 0, 'string', '', 0, 1);
|
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, 0, 'string', '', 0, 1);
|
||||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, 0, 'string', '', null, null, '', 1);
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, 0, 'string', '', null, null, '', 1, 'getFormatedCustomerRef');
|
||||||
// Ref supplier
|
// Ref supplier
|
||||||
$morehtmlref.='<br>';
|
$morehtmlref.='<br>';
|
||||||
$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1);
|
$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1);
|
||||||
$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1);
|
$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1, 'getFormatedSupplierRef');
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||||
// Project
|
// Project
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user