Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
75e52628ec
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.
|
||||
|
||||
### 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
|
||||
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
|
||||
```
|
||||
|
||||
where
|
||||
|
||||
#### Keyword
|
||||
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:
|
||||
- Fix: for a bug fix
|
||||
- Close: for closing a referenced feature request
|
||||
- New: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
||||
- Fix/FIX: for a bug fix
|
||||
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
||||
- Close/CLOSE: for closing a referenced feature request
|
||||
|
||||
#### Issuenum
|
||||
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.
|
||||
|
||||
#### Samples
|
||||
#### Examples
|
||||
<pre>
|
||||
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
||||
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)
|
||||
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)
|
||||
|
||||
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.
|
||||
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:
|
||||
|
||||
* 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.
|
||||
|
||||
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
|
||||
[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/).
|
||||
|
||||
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
|
||||
[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).
|
||||
|
||||
*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
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
- php: '7.3'
|
||||
# We exclude some combinations not usefull to save Travis CPU
|
||||
exclude:
|
||||
- php: '5.5'
|
||||
@ -71,6 +70,8 @@ matrix:
|
||||
env: DB=mariadb
|
||||
- php: '7.1'
|
||||
env: DB=mariadb
|
||||
- php: '7.2'
|
||||
env: DB=mariadb
|
||||
- php: '5.5'
|
||||
env: DB=postgresql
|
||||
- php: '5.6'
|
||||
@ -79,7 +80,7 @@ matrix:
|
||||
env: DB=postgresql
|
||||
- php: '7.1'
|
||||
env: DB=postgresql
|
||||
- php: '7.3'
|
||||
- php: '7.2'
|
||||
env: DB=postgresql
|
||||
- php: nightly
|
||||
env: DB=postgresql
|
||||
@ -298,7 +299,7 @@ script:
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
#parallel-lint --exclude htdocs/includes --blame .
|
||||
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||
set +e
|
||||
echo
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ php-iban 1.4.7 LGPL-3+ Yes
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
TCPDF 6.2.12 LGPL-3+ Yes PDF generation
|
||||
TCPDF 6.2.25 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 4.7.0 MIT licence Yes Library for Stripe module
|
||||
@ -53,9 +53,13 @@ JsTimezoneDetect 1.0.6 MIT License Yes
|
||||
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
|
||||
Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
|
||||
Image libraries
|
||||
Image libraries:
|
||||
Octicons 8.1 MIT Yes
|
||||
|
||||
Font libraries:
|
||||
Fontawesome 4.7 ? Yes
|
||||
Fontawesome 5.0 ? Yes
|
||||
|
||||
|
||||
For licenses compatibility informations:
|
||||
http://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
@ -4,6 +4,7 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
|
||||
For Users:
|
||||
NEW: Module ticket is available as a stable module
|
||||
NEW: Experimental module "Vendor receptions"
|
||||
|
||||
For Developers:
|
||||
@ -12,7 +13,7 @@ For Developers:
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Method GetUrlTrackingStatus were renamed into getUrlTrackingStatus.
|
||||
* Method GetUrlTrackingStatus were renamed into getUrlTrackingStatus for consistency with naming rules.
|
||||
* API getListOfCivility has been renamed into getListOfCivilities for consistency with naming rules.
|
||||
|
||||
|
||||
|
||||
@ -361,12 +361,12 @@ if ($nboftargetok) {
|
||||
}
|
||||
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
|
||||
{
|
||||
#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).'.. | 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).'.. --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\|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";
|
||||
|
||||
118
composer.json
118
composer.json
@ -1,60 +1,62 @@
|
||||
{
|
||||
"name": "dolibarr/dolibarr",
|
||||
"type": "project",
|
||||
"description": "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
|
||||
"keywords": [
|
||||
"erp",
|
||||
"crm",
|
||||
"invoice",
|
||||
"sme",
|
||||
"proposal",
|
||||
"order",
|
||||
"stock",
|
||||
"agenda"
|
||||
],
|
||||
"homepage": "https://www.dolibarr.org",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"support": {
|
||||
"issues": "https://github.com/Dolibarr/dolibarr/issues",
|
||||
"forum": "https://www.dolibarr.org/forum",
|
||||
"wiki": "https://wiki.dolibarr.org",
|
||||
"source": "https://github.com/Dolibarr/dolibarr"
|
||||
},
|
||||
"config": {
|
||||
"vendor-dir": "htdocs/includes"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"ext-curl": "*",
|
||||
"ccampbell/chromephp": "4.1.0",
|
||||
"ckeditor/ckeditor": "4.5.9",
|
||||
"mike42/escpos-php": "1.2.1",
|
||||
"mobiledetect/mobiledetectlib": "2.8.17",
|
||||
"phpoffice/phpexcel": "1.8.1",
|
||||
"restler/framework": "3.0.0-RC6",
|
||||
"tecnickcom/tcpdf": "6.2.12"
|
||||
},
|
||||
"require-dev": {
|
||||
"jakub-onderka/php-parallel-lint": "^0",
|
||||
"jakub-onderka/php-console-highlighter": "^0",
|
||||
"phpunit/phpunit": "^4",
|
||||
"squizlabs/php_codesniffer": "^2",
|
||||
"phpunit/phpunit-selenium": "^2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mysqlnd": "To use with MySQL or MariaDB",
|
||||
"ext-mysqli": "To use with MySQL or MariaDB",
|
||||
"ext-pgsql": "To use with PostgreSQL",
|
||||
"ext-mssql": "To use with MSSQL (experimental)",
|
||||
"ext-pdo_sqlite": "To use with SQLite (experimental)",
|
||||
"ext-gd": "Image manipulation (Required but maybe built-in PHP)",
|
||||
"ext-imagick": "Image manipulation (TCPDF)",
|
||||
"ext-mcrypt": "(Required but maybe built-in PHP)",
|
||||
"ext-openssl": "Secure connections (Emails, SOAP…)",
|
||||
"ext-mbstring": "Handle non UTF-8 databases",
|
||||
"ext-soap": "Native SOAP",
|
||||
"ext-zip": "ODT and Excel support",
|
||||
"ext-xml": "Excel support",
|
||||
"firephp/firephp-core": "Logging to Firebug console support"
|
||||
}
|
||||
"name" : "dolibarr/dolibarr",
|
||||
"type" : "project",
|
||||
"description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
|
||||
"keywords" : [
|
||||
"erp",
|
||||
"crm",
|
||||
"invoice",
|
||||
"sme",
|
||||
"proposal",
|
||||
"order",
|
||||
"stock",
|
||||
"agenda"
|
||||
],
|
||||
"homepage" : "https://www.dolibarr.org",
|
||||
"license" : "GPL-3.0-or-later",
|
||||
"support" : {
|
||||
"issues" : "https://github.com/Dolibarr/dolibarr/issues",
|
||||
"forum" : "https://www.dolibarr.org/forum",
|
||||
"wiki" : "https://wiki.dolibarr.org",
|
||||
"source" : "https://github.com/Dolibarr/dolibarr"
|
||||
},
|
||||
"config" : {
|
||||
"vendor-dir" : "htdocs/includes"
|
||||
},
|
||||
"require" : {
|
||||
"php" : ">=5.3.0",
|
||||
"ext-curl" : "*",
|
||||
"ccampbell/chromephp" : "4.1.0",
|
||||
"ckeditor/ckeditor" : "4.6.2",
|
||||
"mike42/escpos-php" : "1.2.1",
|
||||
"mobiledetect/mobiledetectlib" : "2.8.17",
|
||||
"phpoffice/phpexcel" : "1.8.1",
|
||||
"restler/framework" : "3.0.0-RC6",
|
||||
"tecnickcom/tcpdf" : "^6.2",
|
||||
"atgp/factur-x" : "^1.0",
|
||||
"luracast/restler": "^3.0"
|
||||
},
|
||||
"require-dev" : {
|
||||
"jakub-onderka/php-parallel-lint" : "^0",
|
||||
"jakub-onderka/php-console-highlighter" : "^0",
|
||||
"phpunit/phpunit" : "^4",
|
||||
"squizlabs/php_codesniffer" : "^2",
|
||||
"phpunit/phpunit-selenium" : "^2"
|
||||
},
|
||||
"suggest" : {
|
||||
"ext-mysqlnd" : "To use with MySQL or MariaDB",
|
||||
"ext-mysqli" : "To use with MySQL or MariaDB",
|
||||
"ext-pgsql" : "To use with PostgreSQL",
|
||||
"ext-mssql" : "To use with MSSQL (experimental)",
|
||||
"ext-pdo_sqlite" : "To use with SQLite (experimental)",
|
||||
"ext-gd" : "Image manipulation (Required but maybe built-in PHP)",
|
||||
"ext-imagick" : "Image manipulation (TCPDF)",
|
||||
"ext-mcrypt" : "(Required but maybe built-in PHP)",
|
||||
"ext-openssl" : "Secure connections (Emails, SOAP\u2026)",
|
||||
"ext-mbstring" : "Handle non UTF-8 databases",
|
||||
"ext-soap" : "Native SOAP",
|
||||
"ext-zip" : "ODT and Excel support",
|
||||
"ext-xml" : "Excel support",
|
||||
"firephp/firephp-core" : "Logging to Firebug console support"
|
||||
}
|
||||
}
|
||||
|
||||
341
composer.lock
generated
341
composer.lock
generated
@ -4,9 +4,59 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "c586663818e933f26657871d86d01dc6",
|
||||
"content-hash": "09e891bb978d35a48902a5f57760aee9",
|
||||
"content-hash": "949d55d933c4e0725a2086a189595483",
|
||||
"packages": [
|
||||
{
|
||||
"name": "atgp/factur-x",
|
||||
"version": "v1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/atgp/factur-x.git",
|
||||
"reference": "22e22c3b5dfbb0f25afbd7c3fe69a0305199414c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/atgp/factur-x/zipball/22e22c3b5dfbb0f25afbd7c3fe69a0305199414c",
|
||||
"reference": "22e22c3b5dfbb0f25afbd7c3fe69a0305199414c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-zlib": "*",
|
||||
"php": ">=5.6",
|
||||
"setasign/fpdi-fpdf": "^2.0",
|
||||
"smalot/pdfparser": "^0.13.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Atgp\\FacturX\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Lucas Gouy-Pailler",
|
||||
"email": "lucas.gouypailler@atgp.net"
|
||||
}
|
||||
],
|
||||
"description": "PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files",
|
||||
"keywords": [
|
||||
"ZUGFeRD",
|
||||
"factur-x",
|
||||
"invoice",
|
||||
"pdf",
|
||||
"php",
|
||||
"xml"
|
||||
],
|
||||
"time": "2019-01-16T10:09:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ccampbell/chromephp",
|
||||
"version": "4.1.0",
|
||||
@ -48,20 +98,20 @@
|
||||
"log",
|
||||
"logging"
|
||||
],
|
||||
"time": "2013-06-26 03:44:33"
|
||||
"time": "2013-06-26T03:44:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ckeditor/ckeditor",
|
||||
"version": "4.5.11",
|
||||
"version": "4.6.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ckeditor/ckeditor-releases.git",
|
||||
"reference": "48155a1e1c7e84736b5a166ad3f33acea2a51255"
|
||||
"reference": "268078ab43195b6004d64bc8764c41f2f829640e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/48155a1e1c7e84736b5a166ad3f33acea2a51255",
|
||||
"reference": "48155a1e1c7e84736b5a166ad3f33acea2a51255",
|
||||
"url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/268078ab43195b6004d64bc8764c41f2f829640e",
|
||||
"reference": "268078ab43195b6004d64bc8764c41f2f829640e",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
@ -89,7 +139,7 @@
|
||||
"text",
|
||||
"wysiwyg"
|
||||
],
|
||||
"time": "2016-09-07 13:32:39"
|
||||
"time": "2017-01-12T17:36:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mike42/escpos-php",
|
||||
@ -153,7 +203,7 @@
|
||||
"print",
|
||||
"receipt"
|
||||
],
|
||||
"time": "2016-04-25 01:14:07"
|
||||
"time": "2016-04-25T01:14:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mobiledetect/mobiledetectlib",
|
||||
@ -207,7 +257,7 @@
|
||||
"mobile detector",
|
||||
"php mobile detect"
|
||||
],
|
||||
"time": "2015-09-17 14:45:21"
|
||||
"time": "2015-09-17T14:45:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoffice/phpexcel",
|
||||
@ -264,7 +314,8 @@
|
||||
"xls",
|
||||
"xlsx"
|
||||
],
|
||||
"time": "2015-05-01 07:00:55"
|
||||
"abandoned": "phpoffice/phpspreadsheet",
|
||||
"time": "2015-05-01T07:00:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "restler/framework",
|
||||
@ -273,12 +324,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Luracast/Restler-Framework.git",
|
||||
"reference": "3388d76e73a81f871ce5baa906271071b12cd17f"
|
||||
"reference": "6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/3388d76e73a81f871ce5baa906271071b12cd17f",
|
||||
"reference": "3388d76e73a81f871ce5baa906271071b12cd17f",
|
||||
"url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09",
|
||||
"reference": "6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -325,20 +376,209 @@
|
||||
"rest",
|
||||
"server"
|
||||
],
|
||||
"time": "2016-06-21 12:42:18"
|
||||
"time": "2018-01-06T01:39:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tecnickcom/tcpdf",
|
||||
"version": "6.2.12",
|
||||
"name": "setasign/fpdf",
|
||||
"version": "1.8.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tecnickcom/TCPDF.git",
|
||||
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f"
|
||||
"url": "https://github.com/Setasign/FPDF.git",
|
||||
"reference": "2c68c9e6c034ac3187d25968790139a73184cdb1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f",
|
||||
"reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f",
|
||||
"url": "https://api.github.com/repos/Setasign/FPDF/zipball/2c68c9e6c034ac3187d25968790139a73184cdb1",
|
||||
"reference": "2c68c9e6c034ac3187d25968790139a73184cdb1",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"fpdf.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"no usage restriction"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Olivier Plathey",
|
||||
"email": "oliver@fpdf.org",
|
||||
"homepage": "http://fpdf.org/"
|
||||
}
|
||||
],
|
||||
"description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.",
|
||||
"homepage": "http://www.fpdf.org",
|
||||
"keywords": [
|
||||
"fpdf",
|
||||
"pdf"
|
||||
],
|
||||
"time": "2016-01-01T17:47:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "setasign/fpdi",
|
||||
"version": "v2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Setasign/FPDI.git",
|
||||
"reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Setasign/FPDI/zipball/3c266002f8044f61b17329f7cd702d44d73f0f7f",
|
||||
"reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-zlib": "*",
|
||||
"php": "^5.6 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~5.7",
|
||||
"setasign/fpdf": "~1.8",
|
||||
"setasign/tfpdf": "1.25",
|
||||
"tecnickcom/tcpdf": "~6.2"
|
||||
},
|
||||
"suggest": {
|
||||
"setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured.",
|
||||
"setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
|
||||
"setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.",
|
||||
"setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF."
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"setasign\\Fpdi\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jan Slabon",
|
||||
"email": "jan.slabon@setasign.com",
|
||||
"homepage": "https://www.setasign.com"
|
||||
},
|
||||
{
|
||||
"name": "Maximilian Kresse",
|
||||
"email": "maximilian.kresse@setasign.com",
|
||||
"homepage": "https://www.setasign.com"
|
||||
}
|
||||
],
|
||||
"description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
|
||||
"homepage": "https://www.setasign.com/fpdi",
|
||||
"keywords": [
|
||||
"fpdf",
|
||||
"fpdi",
|
||||
"pdf"
|
||||
],
|
||||
"time": "2019-01-30T14:11:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "setasign/fpdi-fpdf",
|
||||
"version": "v2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Setasign/FPDI-FPDF.git",
|
||||
"reference": "e4363ac09e1b766b38ebea1c3cbe82b3480a11e9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Setasign/FPDI-FPDF/zipball/e4363ac09e1b766b38ebea1c3cbe82b3480a11e9",
|
||||
"reference": "e4363ac09e1b766b38ebea1c3cbe82b3480a11e9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"setasign/fpdf": "^1.8",
|
||||
"setasign/fpdi": "^2.2"
|
||||
},
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jan Slabon",
|
||||
"email": "jan.slabon@setasign.com",
|
||||
"homepage": "https://www.setasign.com"
|
||||
}
|
||||
],
|
||||
"description": "Kind of metadata package for dependencies of the latest versions of FPDI and FPDF.",
|
||||
"homepage": "https://www.setasign.com/fpdi",
|
||||
"keywords": [
|
||||
"fpdf",
|
||||
"fpdi",
|
||||
"pdf"
|
||||
],
|
||||
"time": "2019-01-30T14:38:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smalot/pdfparser",
|
||||
"version": "v0.13.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smalot/pdfparser.git",
|
||||
"reference": "c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smalot/pdfparser/zipball/c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6",
|
||||
"reference": "c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"ext-zlib": "*",
|
||||
"php": ">=5.3.0",
|
||||
"tecnickcom/tcpdf": "~6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"atoum/atoum": "^2.8 | ^3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Smalot\\PdfParser\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastien MALOT",
|
||||
"email": "sebastien@malot.fr"
|
||||
}
|
||||
],
|
||||
"description": "Pdf parser library. Can read and extract information from pdf file.",
|
||||
"homepage": "http://www.pdfparser.org",
|
||||
"keywords": [
|
||||
"extract",
|
||||
"parse",
|
||||
"parser",
|
||||
"pdf",
|
||||
"text"
|
||||
],
|
||||
"time": "2019-01-11T08:49:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tecnickcom/tcpdf",
|
||||
"version": "6.2.26",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tecnickcom/TCPDF.git",
|
||||
"reference": "367241059ca166e3a76490f4448c284e0a161f15"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/367241059ca166e3a76490f4448c284e0a161f15",
|
||||
"reference": "367241059ca166e3a76490f4448c284e0a161f15",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -347,7 +587,6 @@
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"fonts",
|
||||
"config",
|
||||
"include",
|
||||
"tcpdf.php",
|
||||
@ -368,13 +607,13 @@
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPLv3"
|
||||
"LGPL-3.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicola Asuni",
|
||||
"email": "info@tecnick.com",
|
||||
"homepage": "http://nicolaasuni.tecnick.com"
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
|
||||
@ -388,7 +627,7 @@
|
||||
"pdf417",
|
||||
"qrcode"
|
||||
],
|
||||
"time": "2015-09-12 10:08:34"
|
||||
"time": "2018-10-16T17:24:05+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@ -444,7 +683,7 @@
|
||||
"constructor",
|
||||
"instantiate"
|
||||
],
|
||||
"time": "2015-06-14 21:17:01"
|
||||
"time": "2015-06-14T21:17:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jakub-onderka/php-console-color",
|
||||
@ -487,7 +726,7 @@
|
||||
"homepage": "http://www.acci.cz"
|
||||
}
|
||||
],
|
||||
"time": "2014-04-08 15:00:19"
|
||||
"time": "2014-04-08T15:00:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jakub-onderka/php-console-highlighter",
|
||||
@ -531,7 +770,7 @@
|
||||
"homepage": "http://www.acci.cz/"
|
||||
}
|
||||
],
|
||||
"time": "2015-04-20 18:58:01"
|
||||
"time": "2015-04-20T18:58:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jakub-onderka/php-parallel-lint",
|
||||
@ -578,7 +817,7 @@
|
||||
],
|
||||
"description": "This tool check syntax of PHP files about 20x faster than serial check.",
|
||||
"homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint",
|
||||
"time": "2015-12-15 10:42:16"
|
||||
"time": "2015-12-15T10:42:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
@ -632,7 +871,7 @@
|
||||
"reflection",
|
||||
"static analysis"
|
||||
],
|
||||
"time": "2015-12-27 11:43:31"
|
||||
"time": "2015-12-27T11:43:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
@ -677,7 +916,7 @@
|
||||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2016-09-30 07:12:33"
|
||||
"time": "2016-09-30T07:12:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
@ -724,7 +963,7 @@
|
||||
"email": "me@mikevanriel.com"
|
||||
}
|
||||
],
|
||||
"time": "2016-06-10 07:14:17"
|
||||
"time": "2016-06-10T07:14:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
@ -786,7 +1025,7 @@
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2016-06-07 08:13:47"
|
||||
"time": "2016-06-07T08:13:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@ -848,7 +1087,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-10-06 15:47:00"
|
||||
"time": "2015-10-06T15:47:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
@ -895,7 +1134,7 @@
|
||||
"filesystem",
|
||||
"iterator"
|
||||
],
|
||||
"time": "2015-06-21 13:08:43"
|
||||
"time": "2015-06-21T13:08:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
@ -936,7 +1175,7 @@
|
||||
"keywords": [
|
||||
"template"
|
||||
],
|
||||
"time": "2015-06-21 13:50:34"
|
||||
"time": "2015-06-21T13:50:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
@ -980,7 +1219,7 @@
|
||||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2016-05-12 18:03:57"
|
||||
"time": "2016-05-12T18:03:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
@ -1029,7 +1268,7 @@
|
||||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2015-09-15 10:49:45"
|
||||
"time": "2015-09-15T10:49:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
@ -1101,7 +1340,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2016-07-21 06:48:14"
|
||||
"time": "2016-07-21T06:48:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
@ -1157,7 +1396,7 @@
|
||||
"mock",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2015-10-02 06:51:40"
|
||||
"time": "2015-10-02T06:51:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-selenium",
|
||||
@ -1221,7 +1460,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2016-03-01 10:33:56"
|
||||
"time": "2016-03-01T10:33:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
@ -1285,7 +1524,7 @@
|
||||
"compare",
|
||||
"equality"
|
||||
],
|
||||
"time": "2015-07-26 15:48:44"
|
||||
"time": "2015-07-26T15:48:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
@ -1337,7 +1576,7 @@
|
||||
"keywords": [
|
||||
"diff"
|
||||
],
|
||||
"time": "2015-12-08 07:14:41"
|
||||
"time": "2015-12-08T07:14:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
@ -1387,7 +1626,7 @@
|
||||
"environment",
|
||||
"hhvm"
|
||||
],
|
||||
"time": "2016-08-18 05:49:44"
|
||||
"time": "2016-08-18T05:49:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
@ -1454,7 +1693,7 @@
|
||||
"export",
|
||||
"exporter"
|
||||
],
|
||||
"time": "2016-06-17 09:04:28"
|
||||
"time": "2016-06-17T09:04:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
@ -1505,7 +1744,7 @@
|
||||
"keywords": [
|
||||
"global state"
|
||||
],
|
||||
"time": "2015-10-12 03:26:01"
|
||||
"time": "2015-10-12T03:26:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
@ -1558,7 +1797,7 @@
|
||||
],
|
||||
"description": "Provides functionality to recursively process PHP variables",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
||||
"time": "2015-11-11 19:50:13"
|
||||
"time": "2015-11-11T19:50:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
@ -1593,7 +1832,7 @@
|
||||
],
|
||||
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2015-06-21 13:59:46"
|
||||
"time": "2015-06-21T13:59:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
@ -1671,7 +1910,7 @@
|
||||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2016-09-01 23:53:02"
|
||||
"time": "2016-09-01T23:53:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
@ -1720,7 +1959,7 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2016-10-24 18:41:13"
|
||||
"time": "2016-10-24T18:41:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
@ -1770,7 +2009,7 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2016-08-09 15:02:57"
|
||||
"time": "2016-08-09T15:02:57+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
||||
@ -41,30 +41,6 @@ define('QR_FIND_FROM_RANDOM', false);
|
||||
|
||||
* Removed useless directories ("examples", "tools")
|
||||
|
||||
* Fix
|
||||
// initialize subsetchars
|
||||
$subsetchars = array();
|
||||
into
|
||||
// initialize subsetchars
|
||||
$subsetchars = array_fill(0, 256, true);
|
||||
|
||||
* Replace the continue into switch with a break:
|
||||
|
||||
case 're': {
|
||||
// justify block
|
||||
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
|
||||
$this->lispacer = '';
|
||||
continue;
|
||||
}
|
||||
|
||||
into
|
||||
case 're': {
|
||||
// justify block
|
||||
if (!TCPDF_STATIC::empty_string($this->lispacer)) {
|
||||
$this->lispacer = '';
|
||||
break;
|
||||
}
|
||||
|
||||
* Optionnaly, removed all fonts except
|
||||
dejavusans* (used by greek, arab, persan, romanian, turkish),
|
||||
freemono* (russian),
|
||||
@ -72,7 +48,7 @@ case 're': {
|
||||
helvetica* (all other languages),
|
||||
zapfdingbats.php (for special chars like form checkboxes)
|
||||
|
||||
* Optionnaly, made freemono the default monotype font because we removed courier
|
||||
* Optionnaly, made freemono the default monotype font if we removed courier
|
||||
In htdocs/includes/tcpdf/tcpdf.php
|
||||
- protected $default_monospaced_font = 'courier';
|
||||
+ protected $default_monospaced_font = 'freemono';
|
||||
@ -133,6 +109,13 @@ JQUERYFILETREE:
|
||||
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
|
||||
|
||||
|
||||
PHPEXCEL:
|
||||
---------
|
||||
* Replace in htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE.php
|
||||
continue;
|
||||
with:
|
||||
continue 2;
|
||||
|
||||
|
||||
RESTLER:
|
||||
--------
|
||||
@ -149,7 +132,7 @@ to get
|
||||
if ($className == 'Luracast\Restler\mixed') return;
|
||||
...
|
||||
|
||||
Change also file Luracast/Restler/explorer/index.html
|
||||
Change also content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
|
||||
|
||||
+With swagger 2:
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Example fo recurring event, 1 week, no end, exported by Google
|
||||
|
||||
# The recurring event were recorded every monday the 20150518. This is the Recurrence-id, but then
|
||||
# first occurence was moved on tuesday. So this record were added.
|
||||
# first occurrence was moved on tuesday. So this record were added.
|
||||
BEGIN:VEVENT
|
||||
DTSTART;TZID=Europe/Paris:20150519T100000
|
||||
DTEND;TZID=Europe/Paris:20150519T110000
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
README (English)
|
||||
--------------------------------
|
||||
|
||||
This directory contains example of well formated mail messages.
|
||||
This directory contains example of well formatted mail messages.
|
||||
This is to help to build the CMailFile.class.php code.
|
||||
|
||||
@ -189,7 +189,7 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
|
||||
$prodid = mt_rand(1, $num_prods);
|
||||
$product=new Product($db);
|
||||
$result=$product->fetch($prodids[$prodid]);
|
||||
$result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type);
|
||||
$result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db, $object->error);
|
||||
|
||||
@ -93,7 +93,7 @@ if (! $confirmed)
|
||||
$input = trim(fgets(STDIN));
|
||||
}
|
||||
|
||||
// Open input and ouput files
|
||||
// Open input and output files
|
||||
$fhandle = fopen($filepath, 'r');
|
||||
if (! $fhandle)
|
||||
{
|
||||
|
||||
@ -93,7 +93,7 @@ if (! $confirmed)
|
||||
$input = trim(fgets(STDIN));
|
||||
}
|
||||
|
||||
// Open input and ouput files
|
||||
// Open input and output files
|
||||
$fhandle = fopen($filepath, 'r');
|
||||
if (! $fhandle)
|
||||
{
|
||||
|
||||
@ -93,7 +93,7 @@ if (! $confirmed)
|
||||
$input = trim(fgets(STDIN));
|
||||
}
|
||||
|
||||
// Open input and ouput files
|
||||
// Open input and output files
|
||||
$fhandle = fopen($filepath, 'r');
|
||||
if (! $fhandle)
|
||||
{
|
||||
|
||||
@ -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
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: initdemo.sh
|
||||
# usage: initdemo.sh mysqldump_dolibarr_x.x.x.sql database port login pass
|
||||
# Usage: initdemo.sh confirm
|
||||
# usage: initdemo.sh confirm mysqldump_dolibarr_x.x.x.sql database port login pass
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
@ -31,11 +31,20 @@ fi
|
||||
|
||||
|
||||
# ----------------------------- command line params
|
||||
dumpfile=$1;
|
||||
base=$2;
|
||||
port=$3;
|
||||
admin=$4;
|
||||
passwd=$5;
|
||||
confirm=$1;
|
||||
dumpfile=$2;
|
||||
base=$3;
|
||||
port=$4;
|
||||
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
|
||||
@ -132,11 +141,14 @@ then
|
||||
exit;;
|
||||
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
|
||||
DIALOG=${DIALOG=dialog}
|
||||
$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
|
||||
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' `
|
||||
if [ "x$documentdir" != "x" ]
|
||||
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/"
|
||||
cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||
|
||||
mkdir "$documentdir/doctemplates/" 2>/dev/null
|
||||
echo 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
|
||||
echo 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
|
||||
echo Detection of documents directory from $mydir failed so demo files were not copied.
|
||||
fi
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
dev/resources/facturx-zugferd/README.txt
Normal file
1
dev/resources/facturx-zugferd/README.txt
Normal file
@ -0,0 +1 @@
|
||||
See https://github.com/atgp/factur-x
|
||||
@ -115,10 +115,10 @@
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterEquals">
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma">
|
||||
<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>
|
||||
</rule>
|
||||
|
||||
@ -166,7 +166,7 @@
|
||||
<!-- Disallow usage of tab -->
|
||||
<!-- <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> -->
|
||||
|
||||
<!-- Check indent are done with spaces and wiht correct number -->
|
||||
<!-- Check indent are done with spaces and with correct number -->
|
||||
<!-- Disabled as this does not support tab -->
|
||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||
|
||||
@ -348,12 +348,6 @@
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
|
||||
<severity>0</severity>
|
||||
|
||||
@ -9,6 +9,10 @@ fi
|
||||
FROM=$1-01-01
|
||||
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"
|
||||
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"
|
||||
|
||||
@ -4,7 +4,7 @@ This directory contains tools to generate translation files for a new
|
||||
languages or to update translation files for existing languages.
|
||||
See Dolibarr Wiki page:
|
||||
http://wiki.dolibarr.org/index.php/Translator_documentation
|
||||
For more informations on how to use them.
|
||||
For more information on how to use them.
|
||||
|
||||
To install transifex client:
|
||||
sudo pip install --upgrade transifex-client
|
||||
|
||||
@ -188,7 +188,7 @@ if ($action == 'update') {
|
||||
|
||||
$form = new FormAccounting($db);
|
||||
|
||||
// Defaut AccountingAccount RowId Product / Service
|
||||
// Default AccountingAccount RowId Product / Service
|
||||
// at this time ACCOUNTING_SERVICE_SOLD_ACCOUNT & ACCOUNTING_PRODUCT_SOLD_ACCOUNT are account number not accountingacount rowid
|
||||
// so we need to get those default value rowid first
|
||||
$accounting = new AccountingAccount($db);
|
||||
|
||||
@ -173,7 +173,7 @@ while ($obj = $db->fetch_object($resql)) {
|
||||
|
||||
$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);
|
||||
if (! $resql)
|
||||
{
|
||||
@ -183,7 +183,7 @@ if (! $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);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
@ -475,7 +475,7 @@ class AccountancyExport
|
||||
// elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting
|
||||
if (! empty($data->date_echeance))
|
||||
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
|
||||
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y' ); // elarifr: format must be ddmmyy
|
||||
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // elarifr: format must be ddmmyy
|
||||
else
|
||||
$Tab['date_echeance'] = '000000';
|
||||
|
||||
|
||||
@ -227,7 +227,7 @@ class AccountingJournal extends CommonObject
|
||||
if (! empty($this->code))
|
||||
$label .= '<br><b>'.$langs->trans('Code') . ':</b> ' . $this->code;
|
||||
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;
|
||||
|
||||
$linkclose='';
|
||||
@ -254,7 +254,7 @@ class AccountingJournal extends CommonObject
|
||||
}
|
||||
|
||||
$label_link = $this->code;
|
||||
if ($withlabel) $label_link .= ' - ' . $this->label;
|
||||
if ($withlabel) $label_link .= ' - ' . $langs->transnoentities($this->label);
|
||||
|
||||
$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);
|
||||
|
||||
@ -226,7 +226,7 @@ class BookKeeping extends CommonObject
|
||||
$langs->loadLangs(array("errors"));
|
||||
if (in_array($this->doc_type, array('bank', 'expense_report')))
|
||||
{
|
||||
$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type);
|
||||
$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -248,7 +248,7 @@ class BookKeeping extends CommonObject
|
||||
|
||||
// First check if line not yet already in bookkeeping.
|
||||
// Note that we must include doc_type - fk_doc - numero_compte - label to be sure to have unicity of line (we may have several lines
|
||||
// with same doc_type, fk_odc, numero_compte for 1 invoice line when using localtaxes with same account)
|
||||
// with same doc_type, fk_doc, numero_compte for 1 invoice line when using localtaxes with same account)
|
||||
// WARNING: This is not reliable, label may have been modified. This is just a small protection.
|
||||
// The page to make journalization make the test on couple doc_type - fk_doc only.
|
||||
$sql = "SELECT count(*) as nb";
|
||||
@ -1700,11 +1700,11 @@ class BookKeeping extends CommonObject
|
||||
$error++;
|
||||
}
|
||||
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element.'(doc_date, doc_type,';
|
||||
$sql .= ' doc_ref, fk_doc, fk_docdet, thirdparty_code, subledger_account, subledger_label,';
|
||||
$sql .= ' doc_ref, fk_doc, fk_docdet, entity, thirdparty_code, subledger_account, subledger_label,';
|
||||
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
|
||||
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num)';
|
||||
$sql .= 'SELECT doc_date, doc_type,';
|
||||
$sql .= ' doc_ref, fk_doc, fk_docdet, thirdparty_code, subledger_account, subledger_label,';
|
||||
$sql .= ' doc_ref, fk_doc, fk_docdet, entity, thirdparty_code, subledger_account, subledger_label,';
|
||||
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
|
||||
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, '.$next_piecenum.'';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX . $this->table_element.'_tmp WHERE piece_num = '.$piece_num;
|
||||
|
||||
@ -633,12 +633,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $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 '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $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 '"' . $journal . '"' ;
|
||||
@ -654,12 +654,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $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 '""' . $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($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 '"' . $journal . '"' ;
|
||||
@ -679,12 +679,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $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 '""' . $sep;
|
||||
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
|
||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
|
||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
|
||||
print '"' . $journal . '"' ;
|
||||
@ -700,12 +700,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $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 '"' . $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 '"' . $journal . '"' ;
|
||||
|
||||
@ -1297,7 +1297,7 @@ else
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Categories
|
||||
if (! empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire ))
|
||||
if (! empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire))
|
||||
{
|
||||
print '<tr><td>' . $form->editfieldkey("Categories", 'memcats', '', $object, 0) . '</td>';
|
||||
print '<td>';
|
||||
|
||||
@ -424,10 +424,10 @@ foreach ($AdherentType as $key => $adhtype)
|
||||
}
|
||||
print '<tr class="liste_total">';
|
||||
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" class="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" class="right">'.$SommeD.' '.$staticmember->LibStatut(0, $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 right">'.$SommeB.' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).'</td>';
|
||||
print '<td class="liste_total right">'.$SommeC.' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).'</td>';
|
||||
print '<td class="liste_total right">'.$SommeD.' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -84,8 +84,8 @@ $arrayfields=array(
|
||||
'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_private'=>array('label'=>$langs->trans("NotePrivate"), 'checked'=>0),*/
|
||||
'd.datedebut'=>array('label'=>$langs->trans("DateSubscription"), 'checked'=>1, 'position'=>100),
|
||||
'd.datefin'=>array('label'=>$langs->trans("EndSubscription"), 'checked'=>1, 'position'=>101),
|
||||
'c.dateadh'=>array('label'=>$langs->trans("DateSubscription"), 'checked'=>1, 'position'=>100),
|
||||
'c.datef'=>array('label'=>$langs->trans("EndSubscription"), 'checked'=>1, 'position'=>101),
|
||||
'd.amount'=>array('label'=>$langs->trans("Amount"), 'checked'=>1, 'position'=>102),
|
||||
'd.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
'd.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
@ -343,12 +343,12 @@ if (! empty($arrayfields['d.bank']['checked']))
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.date_debut']['checked']))
|
||||
if (! empty($arrayfields['c.dateadh']['checked']))
|
||||
{
|
||||
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>';
|
||||
}
|
||||
@ -417,11 +417,11 @@ if (! empty($arrayfields['d.bank']['checked']))
|
||||
{
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
@ -527,13 +527,13 @@ while ($i < min($num, $limit))
|
||||
}
|
||||
|
||||
// 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";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// 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";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
@ -608,7 +608,7 @@ if ($rowid > 0)
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre( $langs->trans("Name")." / ".$langs->trans("Company"), $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("NameSlashCompany", $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Nature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "d.email", $param, "", "", $sortfield, $sortorder);
|
||||
|
||||
@ -493,7 +493,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry("ProfId2", $mysoc->country_code).'</label></td><td>';
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
print '<input name="siret" id="profid2" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
|
||||
print '<input name="siret" id="profid2" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '') . '">';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -352,7 +352,6 @@ if ($result)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
|
||||
print "\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
@ -383,10 +382,7 @@ if ($result)
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
if (! empty($conf->multicompany->enabled) && !$user->entity)
|
||||
{
|
||||
print '<td></td>';
|
||||
}
|
||||
print '<td></td>';
|
||||
|
||||
// Actions
|
||||
print '<td align="center">';
|
||||
@ -416,7 +412,6 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ $hookmanager->initHooks(array('admin'));
|
||||
// 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.
|
||||
$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
|
||||
$tabname=array();
|
||||
@ -117,7 +117,7 @@ $tabname[22]= MAIN_DB_PREFIX."c_input_reason";
|
||||
$tabname[23]= MAIN_DB_PREFIX."c_revenuestamp";
|
||||
$tabname[24]= MAIN_DB_PREFIX."c_type_resource";
|
||||
$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[28]= MAIN_DB_PREFIX."c_holiday_types";
|
||||
$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[35]= MAIN_DB_PREFIX."c_exp_tax_cat";
|
||||
$tabname[36]= MAIN_DB_PREFIX."c_exp_tax_range";
|
||||
$tabname[37]= MAIN_DB_PREFIX."c_units";
|
||||
|
||||
// Dictionary labels
|
||||
$tablib=array();
|
||||
@ -156,7 +157,7 @@ $tablib[22]= "DictionarySource";
|
||||
$tablib[23]= "DictionaryRevenueStamp";
|
||||
$tablib[24]= "DictionaryResourceType";
|
||||
$tablib[25]= "DictionaryTypeOfContainer";
|
||||
$tablib[26]= "DictionaryUnits";
|
||||
//$tablib[26]= "DictionaryUnits";
|
||||
$tablib[27]= "DictionaryProspectStatus";
|
||||
$tablib[28]= "DictionaryHolidayTypes";
|
||||
$tablib[29]= "DictionaryOpportunityStatus";
|
||||
@ -167,6 +168,7 @@ $tablib[33]= "DictionaryDepartment";
|
||||
$tablib[34]= "DictionaryFunction";
|
||||
$tablib[35]= "DictionaryExpenseTaxCat";
|
||||
$tablib[36]= "DictionaryExpenseTaxRange";
|
||||
$tablib[37]= "DictionaryMeasuringUnits";
|
||||
|
||||
// Requests to extract data
|
||||
$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[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[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[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";
|
||||
@ -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[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[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
|
||||
$tabsqlsort=array();
|
||||
@ -234,7 +237,7 @@ $tabsqlsort[22]="code ASC, label ASC";
|
||||
$tabsqlsort[23]="country ASC, taux ASC";
|
||||
$tabsqlsort[24]="code ASC, 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[28]="country ASC, code ASC";
|
||||
$tabsqlsort[29]="position ASC";
|
||||
@ -245,6 +248,7 @@ $tabsqlsort[33]="code ASC";
|
||||
$tabsqlsort[34]="code ASC";
|
||||
$tabsqlsort[35]="c.label 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
|
||||
$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[24]= "code,label";
|
||||
$tabfield[25]= "code,label";
|
||||
$tabfield[26]= "code,label,short_label";
|
||||
//$tabfield[26]= "code,label,short_label";
|
||||
$tabfield[27]= "code,libelle";
|
||||
$tabfield[28]= "code,label,affect,delay,newbymonth,country_id,country";
|
||||
$tabfield[29]= "code,label,percent,position";
|
||||
@ -284,6 +288,7 @@ $tabfield[33]= "code,label";
|
||||
$tabfield[34]= "code,label";
|
||||
$tabfield[35]= "label";
|
||||
$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
|
||||
$tabfieldvalue=array();
|
||||
@ -312,7 +317,7 @@ $tabfieldvalue[22]= "code,label";
|
||||
$tabfieldvalue[23]= "country,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note";
|
||||
$tabfieldvalue[24]= "code,label";
|
||||
$tabfieldvalue[25]= "code,label";
|
||||
$tabfieldvalue[26]= "code,label,short_label";
|
||||
//$tabfieldvalue[26]= "code,label,short_label";
|
||||
$tabfieldvalue[27]= "code,libelle";
|
||||
$tabfieldvalue[28]= "code,label,affect,delay,newbymonth,country";
|
||||
$tabfieldvalue[29]= "code,label,percent,position";
|
||||
@ -323,6 +328,7 @@ $tabfieldvalue[33]= "code,label";
|
||||
$tabfieldvalue[34]= "code,label";
|
||||
$tabfieldvalue[35]= "label";
|
||||
$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
|
||||
$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[24]= "code,label";
|
||||
$tabfieldinsert[25]= "code,label";
|
||||
$tabfieldinsert[26]= "code,label,short_label";
|
||||
//$tabfieldinsert[26]= "code,label,short_label";
|
||||
$tabfieldinsert[27]= "code,libelle";
|
||||
$tabfieldinsert[28]= "code,label,affect,delay,newbymonth,fk_country";
|
||||
$tabfieldinsert[29]= "code,label,percent,position";
|
||||
@ -362,6 +368,7 @@ $tabfieldinsert[33]= "code,label";
|
||||
$tabfieldinsert[34]= "code,label";
|
||||
$tabfieldinsert[35]= "label";
|
||||
$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
|
||||
// Example: "" if id field is "rowid" and has autoincrement on
|
||||
@ -392,7 +399,7 @@ $tabrowid[22]= "rowid";
|
||||
$tabrowid[23]= "";
|
||||
$tabrowid[24]= "";
|
||||
$tabrowid[25]= "";
|
||||
$tabrowid[26]= "";
|
||||
//$tabrowid[26]= "";
|
||||
$tabrowid[27]= "id";
|
||||
$tabrowid[28]= "";
|
||||
$tabrowid[29]= "";
|
||||
@ -403,6 +410,7 @@ $tabrowid[33]= "rowid";
|
||||
$tabrowid[34]= "rowid";
|
||||
$tabrowid[35]= "";
|
||||
$tabrowid[36]= "";
|
||||
$tabrowid[37]= "";
|
||||
|
||||
// Condition to show dictionary in setup page
|
||||
$tabcond=array();
|
||||
@ -431,7 +439,7 @@ $tabcond[22]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabl
|
||||
$tabcond[23]= true;
|
||||
$tabcond[24]= ! empty($conf->resource->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[28]= ! empty($conf->holiday->enabled);
|
||||
$tabcond[29]= ! empty($conf->projet->enabled);
|
||||
@ -442,6 +450,7 @@ $tabcond[33]= ! empty($conf->hrm->enabled);
|
||||
$tabcond[34]= ! empty($conf->hrm->enabled);
|
||||
$tabcond[35]= ! empty($conf->expensereport->enabled);
|
||||
$tabcond[36]= ! empty($conf->expensereport->enabled);
|
||||
$tabcond[37]= ! empty($conf->product->enabled);
|
||||
|
||||
// List of help for fields
|
||||
$tabhelp=array();
|
||||
@ -470,7 +479,7 @@ $tabhelp[22] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[23] = array('revenuestamp_type'=>'FixedOfPercent');
|
||||
$tabhelp[24] = 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[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"));
|
||||
@ -481,6 +490,7 @@ $tabhelp[33] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[35]= array();
|
||||
$tabhelp[36]= array('range_ik'=>$langs->trans('PrevRangeToThisRange'));
|
||||
$tabhelp[37]= array('code'=>$langs->trans("EnterAnyCode"));
|
||||
|
||||
// List of check for fields (NOT USED YET)
|
||||
$tabfieldcheck=array();
|
||||
@ -509,7 +519,7 @@ $tabfieldcheck[22] = array();
|
||||
$tabfieldcheck[23] = array();
|
||||
$tabfieldcheck[24] = array();
|
||||
$tabfieldcheck[25] = array();
|
||||
$tabfieldcheck[26] = array();
|
||||
//$tabfieldcheck[26] = array();
|
||||
$tabfieldcheck[27] = array();
|
||||
$tabfieldcheck[28] = array();
|
||||
$tabfieldcheck[29] = array();
|
||||
@ -520,6 +530,7 @@ $tabfieldcheck[33] = array();
|
||||
$tabfieldcheck[34] = array();
|
||||
$tabfieldcheck[35]= array();
|
||||
$tabfieldcheck[36]= array();
|
||||
$tabfieldcheck[37]= array();
|
||||
|
||||
// Complete all arrays with entries found into modules
|
||||
complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqlsort, $tabfield, $tabfieldvalue, $tabfieldinsert, $tabrowid, $tabcond, $tabhelp, $tabfieldcheck);
|
||||
@ -1583,6 +1594,12 @@ if ($id)
|
||||
{
|
||||
$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';
|
||||
if ($fieldlist[$field] == 'note' && $id == 10) $class.=' tdoverflowmax200';
|
||||
|
||||
@ -262,20 +262,20 @@ class Dolistore
|
||||
if ($this->version_compare($product->dolibarr_min, DOL_VERSION) <= 0) {
|
||||
if ($this->version_compare($product->dolibarr_max, DOL_VERSION) >= 0) {
|
||||
//compatible
|
||||
$version = '<span class="compatible">'.$langs->trans('CompatibleUpTo', $product->dolibarr_max,
|
||||
$version = '<span class="compatible">'.$langs->trans('CompatibleUpTo', $product->dolibarr_max,
|
||||
$product->dolibarr_min, $product->dolibarr_max).'</span>';
|
||||
$compatible = '';
|
||||
$compatible = '';
|
||||
} else {
|
||||
//never compatible, module expired
|
||||
$version = '<span class="notcompatible">'.$langs->trans('NotCompatible', DOL_VERSION,
|
||||
$version = '<span class="notcompatible">'.$langs->trans('NotCompatible', DOL_VERSION,
|
||||
$product->dolibarr_min, $product->dolibarr_max).'</span>';
|
||||
$compatible = 'NotCompatible';
|
||||
$compatible = 'NotCompatible';
|
||||
}
|
||||
} else {
|
||||
//need update
|
||||
$version = '<span class="compatibleafterupdate">'.$langs->trans('CompatibleAfterUpdate', DOL_VERSION,
|
||||
$product->dolibarr_min, $product->dolibarr_max).'</span>';
|
||||
$compatible = 'NotCompatible';
|
||||
$compatible = 'NotCompatible';
|
||||
}
|
||||
|
||||
//.'<br><a class="inline-block valignmiddle" target="_blank" href="'.$this->shop_url.$product->id.'"><span class="details button">'.$langs->trans("SeeInMarkerPlace").'</span></a>
|
||||
|
||||
@ -207,7 +207,7 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
|
||||
}
|
||||
} elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') {
|
||||
$val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
|
||||
@ -144,9 +144,9 @@ if ($action == 'add')
|
||||
}
|
||||
|
||||
$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)
|
||||
{
|
||||
if (preg_match('/fk_mainmenu=/', $s))
|
||||
@ -214,9 +214,9 @@ if ($action == 'add')
|
||||
$menu->target=GETPOST('target', 'alpha');
|
||||
$menu->user=GETPOST('user', '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
|
||||
{
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -252,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");
|
||||
}
|
||||
|
||||
$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 '<input type="hidden" action="change_menu_handler">';
|
||||
print $langs->trans("MenuHandler").': ';
|
||||
print $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 '<div class="floatright">';
|
||||
print $newcardbutton;
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
@ -393,14 +406,6 @@ if ($conf->use_javascript_ajax)
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
@ -170,7 +170,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
{
|
||||
$freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT', 'none'); // No alpha here, we want exact string
|
||||
$doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED', 'alpha');
|
||||
$doubleapproval = price2num($doubleapproval );
|
||||
$doubleapproval = price2num($doubleapproval);
|
||||
|
||||
$res1 = dolibarr_set_const($db, "SUPPLIER_ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
$res2 = dolibarr_set_const($db, "SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED", $doubleapproval, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
@ -281,10 +281,10 @@ if ($mode == 'overwrite')
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("NewTranslationStringToShow", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
|
||||
//if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
|
||||
//if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print '<td align="center"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -470,10 +470,10 @@ if ($mode == 'searchkey')
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).'</td>';
|
||||
print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).'</td>';
|
||||
print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("CurrentTranslationString", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
|
||||
//if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity",$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
|
||||
//if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print '<td align="center"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ Develop an API
|
||||
|
||||
The API uses Lucarast Restler framework. Please check documentation https://www.luracast.com/products/restler and examples http://help.luracast.com/restler/examples/
|
||||
|
||||
Github contains also usefull informations : https://github.com/Luracast/Restler
|
||||
Github contains also useful information : https://github.com/Luracast/Restler
|
||||
|
||||
To implement it into Dolibarr, you need to create a specific class for object we want to use. A skeleton file is available into /modulebuilder/class directory : *api_mymodule_class.class.php*
|
||||
The API class file must be put into object class directory, with specific file name. By example, API class file for '*myobject*' must be put as : /htdocs/*myobject*/class/api_*myobject*.class.php. Class must be named **MyobjectApi**.
|
||||
@ -67,6 +67,6 @@ It is possible to specify url for API methods by simply use the PHPDoc tag **@ur
|
||||
**Other Annotations**
|
||||
Other annotations are used, you are encouraged to read them : https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md
|
||||
|
||||
PHPDoc tags can also be used to specify variables informations for API. Again, rtfm : https://github.com/Luracast/Restler/blob/master/PARAM.md
|
||||
PHPDoc tags can also be used to specify variables information for API. Again, rtfm : https://github.com/Luracast/Restler/blob/master/PARAM.md
|
||||
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ class BlockedLogAuthority
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."blockedlog_authority as b";
|
||||
|
||||
if ($id) $sql.= " WHERE b.rowid = ". $id;
|
||||
elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ;
|
||||
elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape($signature) ."'" ;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -394,7 +394,7 @@ class BlockedLog
|
||||
// Add more fields to exclude depending on object type
|
||||
if ($this->element == 'cashcontrol')
|
||||
{
|
||||
$arrayoffieldstoexclude = array_merge($arrayoffieldstoexclude, array(
|
||||
$arrayoffieldstoexclude = array_merge($arrayoffieldstoexclude, array(
|
||||
'name','lastname','firstname','region','region_id','region_code','state','state_id','state_code','country','country_id','country_code',
|
||||
'total_ht','total_tva','total_ttc','total_localtax1','total_localtax2',
|
||||
'barcode_type','barcode_type_code','barcode_type_label','barcode_type_coder','mode_reglement_id','cond_reglement_id','mode_reglement','cond_reglement','shipping_method_id',
|
||||
@ -459,7 +459,7 @@ class BlockedLog
|
||||
$lineid++;
|
||||
foreach($tmpline as $keyline => $valueline)
|
||||
{
|
||||
if (! in_array($keyline, array(
|
||||
if (! in_array($keyline, array(
|
||||
'ref','multicurrency_code','multicurrency_total_ht','multicurrency_total_tva','multicurrency_total_ttc','qty','product_type','vat_src_code','tva_tx','info_bits','localtax1_tx','localtax2_tx','total_ht','total_tva','total_ttc','total_localtax1','total_localtax2'
|
||||
))) continue; // Discard if not into a dedicated list
|
||||
|
||||
@ -575,7 +575,7 @@ class BlockedLog
|
||||
foreach($tmpobject->thirdparty as $key=>$value)
|
||||
{
|
||||
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
|
||||
if (! in_array($key, array(
|
||||
if (! in_array($key, array(
|
||||
'name','name_alias','ref_ext','address','zip','town','state_code','country_code','idprof1','idprof2','idprof3','idprof4','idprof5','idprof6','phone','fax','email','barcode',
|
||||
'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
|
||||
))) continue; // Discard if not into a dedicated list
|
||||
@ -592,7 +592,7 @@ class BlockedLog
|
||||
foreach($tmpobject as $key=>$value)
|
||||
{
|
||||
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
|
||||
if (! in_array($key, array(
|
||||
if (! in_array($key, array(
|
||||
'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public'
|
||||
))) continue; // Discard if not into a dedicated list
|
||||
if (!is_object($value))
|
||||
|
||||
@ -701,10 +701,10 @@ class Categorie extends CommonObject
|
||||
// For backward compatibility
|
||||
if ($type == 'societe') {
|
||||
$type = 'customer';
|
||||
dol_syslog( get_class( $this ) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING);
|
||||
dol_syslog(get_class($this) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING);
|
||||
} elseif ($type == 'fournisseur') {
|
||||
$type = 'supplier';
|
||||
dol_syslog( get_class( $this ) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING);
|
||||
dol_syslog(get_class($this) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING);
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
@ -758,7 +758,7 @@ class Categorie extends CommonObject
|
||||
$sql = "SELECT c.fk_" . $this->MAP_CAT_FK[$type];
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as c";
|
||||
$sql .= ", " . MAIN_DB_PREFIX . $this->MAP_OBJ_TABLE[$type] . " as o";
|
||||
$sql .= " WHERE o.entity IN (" . getEntity( $obj->element).")";
|
||||
$sql .= " WHERE o.entity IN (" . getEntity($obj->element).")";
|
||||
$sql.= " AND c.fk_categorie = ".$this->id;
|
||||
$sql .= " AND c.fk_" . $this->MAP_CAT_FK[$type] . " = o.rowid";
|
||||
|
||||
@ -775,7 +775,7 @@ class Categorie extends CommonObject
|
||||
else
|
||||
{
|
||||
$obj = new $this->MAP_OBJ_CLASS[$type]( $this->db );
|
||||
$obj->fetch( $rec['fk_' . $this->MAP_CAT_FK[$type]]);
|
||||
$obj->fetch($rec['fk_' . $this->MAP_CAT_FK[$type]]);
|
||||
$objs[] = $obj;
|
||||
}
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ class Categorie extends CommonObject
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie as c";
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'";
|
||||
$sql .= " WHERE c.entity IN (" . getEntity( 'category') . ")";
|
||||
$sql .= " WHERE c.entity IN (" . getEntity('category') . ")";
|
||||
$sql .= " AND c.type = " . $type;
|
||||
|
||||
dol_syslog(get_class($this)."::get_full_arbo get category list", LOG_DEBUG);
|
||||
@ -1418,7 +1418,7 @@ class Categorie extends CommonObject
|
||||
$sql = "SELECT ct.fk_categorie, c.label, c.rowid";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as ct, " . MAIN_DB_PREFIX . "categorie as c";
|
||||
$sql .= " WHERE ct.fk_categorie = c.rowid AND ct.fk_" . $this->MAP_CAT_FK[$type] . " = " . (int) $id . " AND c.type = " . $this->MAP_ID[$type];
|
||||
$sql .= " AND c.entity IN (" . getEntity( 'category') . ")";
|
||||
$sql .= " AND c.entity IN (" . getEntity('category') . ")";
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
if ($res)
|
||||
@ -1470,16 +1470,16 @@ class Categorie extends CommonObject
|
||||
// For backward compatibility
|
||||
if (is_numeric($type)) {
|
||||
// We want to reverse lookup
|
||||
$map_type = array_flip( $this->MAP_ID );
|
||||
$map_type = array_flip($this->MAP_ID);
|
||||
$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 );
|
||||
}
|
||||
|
||||
// Generation requete recherche
|
||||
$sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "categorie";
|
||||
$sql .= " WHERE type = " . $this->MAP_ID[$type];
|
||||
$sql .= " AND entity IN (" . getEntity( 'category') . ")";
|
||||
$sql .= " AND entity IN (" . getEntity('category') . ")";
|
||||
if ($nom)
|
||||
{
|
||||
if (! $exact)
|
||||
|
||||
@ -77,7 +77,7 @@ if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sen
|
||||
{
|
||||
if(empty($file['tmp_name'][$i]) || intval($conf->global->MAIN_UPLOAD_DOC) * 1000 <= filesize($file['tmp_name'][$i]) )
|
||||
{
|
||||
setEventMessage($file['name'][$i] .' : '. $langs->trans(empty($file['tmp_name'][$i])? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles' ) );
|
||||
setEventMessage($file['name'][$i] .' : '. $langs->trans(empty($file['tmp_name'][$i])? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles'));
|
||||
unset($file['name'][$i], $file['type'][$i], $file['tmp_name'][$i], $file['error'][$i], $file['size'][$i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ class ActionCommReminder extends CommonObject
|
||||
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only. Using a negative value means field is not shown by default on list but can be selected for viewing)
|
||||
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
|
||||
* 'position' is the sort order of field.
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -96,7 +97,7 @@ class ICal
|
||||
* Translate Calendar
|
||||
*
|
||||
* @param string $uri Url
|
||||
* @return array
|
||||
* @return array|string
|
||||
*/
|
||||
function parse($uri)
|
||||
{
|
||||
@ -109,7 +110,7 @@ class ICal
|
||||
|
||||
$this->file_text = preg_split("[\n]", $this->file_text);
|
||||
|
||||
// is this text vcalendar standart text ? on line 1 is BEGIN:VCALENDAR
|
||||
// is this text vcalendar standard text ? on line 1 is BEGIN:VCALENDAR
|
||||
if (!stristr($this->file_text[0], 'BEGIN:VCALENDAR')) return 'error not VCALENDAR';
|
||||
|
||||
$insidealarm=0;
|
||||
@ -363,9 +364,9 @@ class ICal
|
||||
|
||||
// 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()
|
||||
{
|
||||
@ -398,7 +399,7 @@ class ICal
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return eventlist array (not sort eventlist array)
|
||||
* Return eventlist array (not sorted eventlist array)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@ -422,7 +423,7 @@ class ICal
|
||||
|
||||
// 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
|
||||
*/
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* 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
|
||||
*
|
||||
* @param string $username Login
|
||||
* @param User $username Login
|
||||
* @param int $day Day
|
||||
* @param int $month Month
|
||||
* @param int $year Year
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* 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
|
||||
*
|
||||
* @param string $username Login
|
||||
* @param User $username Login
|
||||
* @param int $day Day
|
||||
* @param int $month Month
|
||||
* @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) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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>
|
||||
*
|
||||
* 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
|
||||
@ -487,7 +488,7 @@ if ($object->id > 0)
|
||||
$langs->load("categories");
|
||||
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
||||
print '<td>';
|
||||
print $form->showCategories( $object->id, 'customer', 1 );
|
||||
print $form->showCategories($object->id, 'customer', 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
@ -1327,12 +1328,6 @@ if ($object->id > 0)
|
||||
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))
|
||||
{
|
||||
print load_fiche_titre($langs->trans("ActionsOnCompany"), '', '');
|
||||
|
||||
@ -64,17 +64,17 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_prospectlevel";
|
||||
$sql .= " WHERE active > 0";
|
||||
$sql .= " ORDER BY sortorder";
|
||||
dol_syslog ( get_class( $this ) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG );
|
||||
$resql = $this->db->query( $sql );
|
||||
dol_syslog (get_class($this) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows( $resql );
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ( $i < $num ) {
|
||||
$obj = $this->db->fetch_object( $resql );
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$level = $langs->trans( $obj->code );
|
||||
$level = $langs->trans($obj->code);
|
||||
if ($level == $obj->code)
|
||||
$level = $langs->trans( $obj->label );
|
||||
$level = $langs->trans($obj->label);
|
||||
$options_array[$obj->code] = $level;
|
||||
|
||||
$i ++;
|
||||
@ -120,10 +120,10 @@ class FormAdvTargetEmailing extends Form
|
||||
$foundselected = false;
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object ( $resql );
|
||||
$obj = $this->db->fetch_object ($resql);
|
||||
$countryArray [$i] ['rowid'] = $obj->rowid;
|
||||
$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'];
|
||||
$i ++;
|
||||
}
|
||||
@ -166,25 +166,25 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql_usr .= " WHERE u2.entity IN (0," . $conf->entity . ")";
|
||||
$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 .= " ORDER BY name ASC";
|
||||
// print $sql_usr;exit;
|
||||
|
||||
$resql_usr = $this->db->query ( $sql_usr );
|
||||
$resql_usr = $this->db->query ($sql_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 . ')';
|
||||
|
||||
$options_array [$obj_usr->rowid] = $label;
|
||||
}
|
||||
$this->db->free ( $resql_usr );
|
||||
$this->db->free ($resql_usr);
|
||||
} 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 +227,8 @@ class FormAdvTargetEmailing extends Form
|
||||
|
||||
if (is_array($sqlqueryparam))
|
||||
{
|
||||
$param_list = array_keys ( $sqlqueryparam );
|
||||
$InfoFieldList = explode ( ":", $param_list [0] );
|
||||
$param_list = array_keys ($sqlqueryparam);
|
||||
$InfoFieldList = explode (":", $param_list [0]);
|
||||
|
||||
// 0 1 : tableName
|
||||
// 1 2 : label field name Nom du champ contenant le libelle
|
||||
@ -237,8 +237,8 @@ class FormAdvTargetEmailing extends Form
|
||||
|
||||
$keyList = 'rowid';
|
||||
|
||||
if (count ( $InfoFieldList ) >= 3) {
|
||||
if (strpos ( $InfoFieldList [3], 'extra.' ) !== false) {
|
||||
if (count ($InfoFieldList) >= 3) {
|
||||
if (strpos ($InfoFieldList [3], 'extra.') !== false) {
|
||||
$keyList = 'main.' . $InfoFieldList [2] . ' as rowid';
|
||||
} else {
|
||||
$keyList = $InfoFieldList [2] . ' as rowid';
|
||||
@ -247,10 +247,10 @@ class FormAdvTargetEmailing extends Form
|
||||
|
||||
$sql = 'SELECT ' . $keyList . ', ' . $InfoFieldList [1];
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList [0];
|
||||
if (! empty ( $InfoFieldList [3] )) {
|
||||
if (! empty ($InfoFieldList [3])) {
|
||||
|
||||
// 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 .= ' WHERE extra.fk_object=main.' . $InfoFieldList [2] . ' AND ' . $InfoFieldList [3];
|
||||
} else {
|
||||
@ -270,13 +270,13 @@ class FormAdvTargetEmailing extends Form
|
||||
$i = 0;
|
||||
if ($num) {
|
||||
while ( $i < $num ) {
|
||||
$obj = $this->db->fetch_object ( $resql );
|
||||
$labeltoshow = dol_trunc ( $obj->$InfoFieldList [1], 90 );
|
||||
$obj = $this->db->fetch_object ($resql);
|
||||
$labeltoshow = dol_trunc ($obj->$InfoFieldList [1], 90);
|
||||
$options_array[$obj->rowid]=$labeltoshow;
|
||||
$i ++;
|
||||
}
|
||||
}
|
||||
$this->db->free ( $resql );
|
||||
$this->db->free ($resql);
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ class FormAdvTargetEmailing extends Form
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
return $this->advMultiselectarray ( $htmlname, $options_array, $selected_array );
|
||||
return $this->advMultiselectarray ($htmlname, $options_array, $selected_array);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -415,7 +415,7 @@ class FormAdvTargetEmailing extends Form
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
return $this->advMultiselectarray( $htmlname, $options_array, $selected_array );
|
||||
return $this->advMultiselectarray($htmlname, $options_array, $selected_array);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -438,19 +438,19 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql .= " WHERE type_element='$type_element'";
|
||||
$sql .= " ORDER BY c.name";
|
||||
|
||||
dol_syslog ( get_class ( $this ) . "::".__METHOD__, LOG_DEBUG );
|
||||
$resql = $this->db->query ( $sql );
|
||||
dol_syslog (get_class ($this) . "::".__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query ($sql);
|
||||
if ($resql) {
|
||||
|
||||
|
||||
$out .= '<select id="' . $htmlname . '" class="flat" name="' . $htmlname . '">';
|
||||
if ($showempty)
|
||||
$out .= '<option value=""></option>';
|
||||
$num = $this->db->num_rows ( $resql );
|
||||
$num = $this->db->num_rows ($resql);
|
||||
$i = 0;
|
||||
if ($num) {
|
||||
while ( $i < $num ) {
|
||||
$obj = $this->db->fetch_object ( $resql );
|
||||
$obj = $this->db->fetch_object ($resql);
|
||||
$label = $obj->name;
|
||||
if (empty($label)) {
|
||||
$label=$obj->fk_element;
|
||||
@ -466,9 +466,9 @@ class FormAdvTargetEmailing extends Form
|
||||
}
|
||||
$out .= '</select>';
|
||||
} else {
|
||||
dol_print_error ( $this->db );
|
||||
dol_print_error ($this->db);
|
||||
}
|
||||
$this->db->free ( $resql );
|
||||
$this->db->free ($resql);
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@ class Mailing extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Return a link to the object card (with optionaly the picto)
|
||||
* Return a link to the object card (with optionally the picto)
|
||||
*
|
||||
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
|
||||
* @param string $option On what the link point to ('nolink', ...)
|
||||
|
||||
@ -165,7 +165,7 @@ if (empty($reshook))
|
||||
if ($object->id > 0) {
|
||||
if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY)) {
|
||||
//Get difference between old and new delivery date and change lines according to difference
|
||||
$date_delivery = dol_mktime(12, 0, 0,
|
||||
$date_delivery = dol_mktime(12, 0, 0,
|
||||
GETPOST('date_deliverymonth', 'int'),
|
||||
GETPOST('date_deliveryday', 'int'),
|
||||
GETPOST('date_deliveryyear', 'int')
|
||||
@ -173,7 +173,7 @@ if (empty($reshook))
|
||||
if (!empty($object->date_livraison) && !empty($date_delivery))
|
||||
{
|
||||
//Attempt to get the date without possible hour rounding errors
|
||||
$old_date_delivery = dol_mktime(12, 0, 0,
|
||||
$old_date_delivery = dol_mktime(12, 0, 0,
|
||||
dol_print_date($object->date_livraison, '%m'),
|
||||
dol_print_date($object->date_livraison, '%d'),
|
||||
dol_print_date($object->date_livraison, '%Y')
|
||||
@ -724,7 +724,7 @@ if (empty($reshook))
|
||||
{
|
||||
$lineId = intval($lineId);
|
||||
$originLine = new $lineClassName($db);
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
|
||||
{
|
||||
$originLine->fetch_optionals($lineId);
|
||||
$desc = $originLine->desc;
|
||||
@ -1895,7 +1895,7 @@ if ($action == 'create')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
|
||||
$notify = new Notify($db);
|
||||
$formquestion = array_merge($formquestion, array(
|
||||
$formquestion = array_merge($formquestion, array(
|
||||
array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)),
|
||||
));
|
||||
}
|
||||
|
||||
@ -57,12 +57,13 @@ class Proposals extends DolibarrApi
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
function get($id)
|
||||
function get($id, $contact_list = 1)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->propal->lire) {
|
||||
throw new RestException(401);
|
||||
@ -77,9 +78,8 @@ class Proposals extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
// Add external contacts ids
|
||||
$this->propal->contacts_ids = $this->propal->liste_contact(-1, 'external', 1);
|
||||
|
||||
// Add external contacts ids.
|
||||
$this->propal->contacts_ids = $this->propal->liste_contact(-1, 'external', $contact_list);
|
||||
$this->propal->fetchObjectLinked();
|
||||
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)
|
||||
*
|
||||
@ -665,7 +745,7 @@ class Proposals extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->propal->classifyBilled(DolibarrApiAccess::$user );
|
||||
$result = $this->propal->classifyBilled(DolibarrApiAccess::$user);
|
||||
if ($result < 0) {
|
||||
throw new RestException(500, 'Error : '.$this->propal->error);
|
||||
}
|
||||
|
||||
@ -667,7 +667,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
global $mysoc;
|
||||
|
||||
dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent,
|
||||
dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent,
|
||||
txtva=$txtva, desc=$desc, price_base_type=$price_base_type, info_bits=$info_bits, special_code=$special_code, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, type=$type, date_start=$date_start, date_end=$date_end");
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
@ -1078,7 +1078,7 @@ class Propal extends CommonObject
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
|
||||
@ -1347,7 +1347,7 @@ if (empty($reshook))
|
||||
{
|
||||
$lineId = intval($lineId);
|
||||
$originLine = new $lineClassName($db);
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
|
||||
{
|
||||
$originLine->fetch_optionals($lineId);
|
||||
$desc = $originLine->desc;
|
||||
|
||||
@ -56,12 +56,13 @@ class Orders extends DolibarrApi
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
function get($id)
|
||||
function get($id, $contact_list = 1)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->commande->lire) {
|
||||
throw new RestException(401);
|
||||
@ -77,7 +78,7 @@ class Orders extends DolibarrApi
|
||||
}
|
||||
|
||||
// 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();
|
||||
return $this->_cleanObjectDatas($this->commande);
|
||||
}
|
||||
@ -398,6 +399,86 @@ class Orders extends DolibarrApi
|
||||
throw new RestException(405, $this->commande->error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
|
||||
@ -885,7 +885,7 @@ class Commande extends CommonOrder
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
|
||||
@ -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.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['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['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $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, '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, 'align="center"', $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, '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, '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, 'class="right"', $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, '', $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, '', $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, '', $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, '', $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, '', $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, '', $sortfield, $sortorder, 'right ');
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
$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
|
||||
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.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.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.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, 'align="center"', $sortfield, $sortorder, '');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
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, '', $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, '', $sortfield, $sortorder, 'right ');
|
||||
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, '', $sortfield, $sortorder, 'maxwidthsearch center ');
|
||||
print '</tr>'."\n";
|
||||
|
||||
$total=0;
|
||||
|
||||
@ -290,7 +290,7 @@ if (($action == 'create' || $action == 'add') && !$error)
|
||||
$array_options = $lines[$i]->array_options;
|
||||
}
|
||||
|
||||
$result = $object->addline(
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
|
||||
@ -120,14 +120,15 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$result=$object->fetch($id, $ref);
|
||||
$search_account = $object->id; // Force the search field on id of account
|
||||
|
||||
if (! ($object->id > 0) )
|
||||
{
|
||||
$langs->load("errors");
|
||||
print($langs->trans('ErrorRecordNotFound'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (! ($object->id > 0) )
|
||||
{
|
||||
$langs->load("errors");
|
||||
print($langs->trans('ErrorRecordNotFound'));
|
||||
exit;
|
||||
}
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('banktransactionlist', $contextpage));
|
||||
|
||||
@ -1614,7 +1614,7 @@ class Account extends CommonObject
|
||||
//Replace the old AccountNumber key with the new BankAccountNumber key
|
||||
$fieldlists = explode(
|
||||
' ',
|
||||
preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber',
|
||||
preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber',
|
||||
$conf->global->BANK_SHOW_ORDER_OPTION)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
/* Copyright (C) 2017-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -71,6 +71,8 @@ class PaymentVarious extends CommonObject
|
||||
|
||||
public $accountancy_code;
|
||||
|
||||
public $subledger_account;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
@ -139,6 +141,7 @@ class PaymentVarious extends CommonObject
|
||||
$sql.= " label='".$this->db->escape($this->label)."',";
|
||||
$sql.= " note='".$this->db->escape($this->note)."',";
|
||||
$sql.= " accountancy_code='".$this->db->escape($this->accountancy_code)."',";
|
||||
$sql.= " subledger_account='".$this->db->escape($this->subledger_account)."',";
|
||||
$sql.= " fk_projet='".$this->db->escape($this->fk_project)."',";
|
||||
$sql.= " fk_bank=".($this->fk_bank > 0 ? $this->fk_bank:"null").",";
|
||||
$sql.= " fk_user_author=".$this->fk_user_author.",";
|
||||
@ -196,6 +199,7 @@ class PaymentVarious extends CommonObject
|
||||
$sql.= " v.label,";
|
||||
$sql.= " v.note,";
|
||||
$sql.= " v.accountancy_code,";
|
||||
$sql.= " v.subledger_account,";
|
||||
$sql.= " v.fk_projet as fk_project,";
|
||||
$sql.= " v.fk_bank,";
|
||||
$sql.= " v.fk_user_author,";
|
||||
@ -215,25 +219,26 @@ class PaymentVarious extends CommonObject
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->rowid;
|
||||
$this->tms = $this->db->jdate($obj->tms);
|
||||
$this->datep = $this->db->jdate($obj->datep);
|
||||
$this->datev = $this->db->jdate($obj->datev);
|
||||
$this->sens = $obj->sens;
|
||||
$this->amount = $obj->amount;
|
||||
$this->type_payment = $obj->fk_typepayment;
|
||||
$this->num_payment = $obj->num_payment;
|
||||
$this->label = $obj->label;
|
||||
$this->note = $obj->note;
|
||||
$this->accountancy_code = $obj->accountancy_code;
|
||||
$this->fk_project = $obj->fk_project;
|
||||
$this->fk_bank = $obj->fk_bank;
|
||||
$this->fk_user_author = $obj->fk_user_author;
|
||||
$this->fk_user_modif = $obj->fk_user_modif;
|
||||
$this->fk_account = $obj->fk_account;
|
||||
$this->fk_type = $obj->fk_type;
|
||||
$this->rappro = $obj->rappro;
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->rowid;
|
||||
$this->tms = $this->db->jdate($obj->tms);
|
||||
$this->datep = $this->db->jdate($obj->datep);
|
||||
$this->datev = $this->db->jdate($obj->datev);
|
||||
$this->sens = $obj->sens;
|
||||
$this->amount = $obj->amount;
|
||||
$this->type_payment = $obj->fk_typepayment;
|
||||
$this->num_payment = $obj->num_payment;
|
||||
$this->label = $obj->label;
|
||||
$this->note = $obj->note;
|
||||
$this->subledger_account = $obj->subledger_account;
|
||||
$this->accountancy_code = $obj->accountancy_code;
|
||||
$this->fk_project = $obj->fk_project;
|
||||
$this->fk_bank = $obj->fk_bank;
|
||||
$this->fk_user_author = $obj->fk_user_author;
|
||||
$this->fk_user_modif = $obj->fk_user_modif;
|
||||
$this->fk_account = $obj->fk_account;
|
||||
$this->fk_type = $obj->fk_type;
|
||||
$this->rappro = $obj->rappro;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
@ -298,6 +303,7 @@ class PaymentVarious extends CommonObject
|
||||
$this->amount='';
|
||||
$this->label='';
|
||||
$this->accountancy_code='';
|
||||
$this->subledger_account='';
|
||||
$this->note='';
|
||||
$this->fk_bank='';
|
||||
$this->fk_user_author='';
|
||||
@ -360,6 +366,7 @@ class PaymentVarious extends CommonObject
|
||||
if ($this->note) $sql.= ", note";
|
||||
$sql.= ", label";
|
||||
$sql.= ", accountancy_code";
|
||||
$sql.= ", subledger_account";
|
||||
$sql.= ", fk_projet";
|
||||
$sql.= ", fk_user_author";
|
||||
$sql.= ", datec";
|
||||
@ -376,6 +383,7 @@ class PaymentVarious extends CommonObject
|
||||
if ($this->note) $sql.= ", '".$this->db->escape($this->note)."'";
|
||||
$sql.= ", '".$this->db->escape($this->label)."'";
|
||||
$sql.= ", '".$this->db->escape($this->accountancy_code)."'";
|
||||
$sql.= ", '".$this->db->escape($this->subledger_account)."'";
|
||||
$sql.= ", ".($this->fk_project > 0? $this->fk_project : 0);
|
||||
$sql.= ", ".$user->id;
|
||||
$sql.= ", '".$this->db->idate($now)."'";
|
||||
@ -406,7 +414,7 @@ class PaymentVarious extends CommonObject
|
||||
$sign=1;
|
||||
if ($this->sens == '0') $sign=-1;
|
||||
|
||||
$bank_line_id = $acc->addline(
|
||||
$bank_line_id = $acc->addline(
|
||||
$this->datep,
|
||||
$this->type_payment,
|
||||
$this->label,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
/* Copyright (C) 2017-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -48,9 +48,10 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
||||
$accountid=GETPOST("accountid") > 0 ? GETPOST("accountid", "int") : 0;
|
||||
$label=GETPOST("label", "alpha");
|
||||
$sens=GETPOST("sens", "int");
|
||||
$amount=GETPOST("amount");
|
||||
$paymenttype=GETPOST("paymenttype");
|
||||
$accountancy_code=GETPOST("accountancy_code", "int");
|
||||
$amount=GETPOST("amount", "alpha");
|
||||
$paymenttype=GETPOST("paymenttype", "int");
|
||||
$accountancy_code=GETPOST("accountancy_code", "alpha");
|
||||
$subledger_account=GETPOST("subledger_account", "alpha");
|
||||
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
|
||||
|
||||
// Security check
|
||||
@ -112,7 +113,10 @@ if (empty($reshook))
|
||||
$object->type_payment=GETPOST("paymenttype", 'int') > 0 ? GETPOST("paymenttype", "int") : 0;
|
||||
$object->num_payment=GETPOST("num_payment", 'alpha');
|
||||
$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", "alpha") : "";
|
||||
|
||||
$object->sens=GETPOST('sens');
|
||||
$object->fk_project= GETPOST('fk_project', 'int');
|
||||
|
||||
@ -325,6 +329,28 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Subledger account
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("SubledgerAccount").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||
{
|
||||
print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1, '');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" name="subledger_account" value="'.$subledger_account.'">';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
else // For external software
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("SubledgerAccount").'</td>';
|
||||
print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="subledger_account" value="'.$subledger_account.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
@ -447,6 +473,13 @@ if ($id)
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Subledger account
|
||||
print '<tr><td class="nowrap">';
|
||||
print $langs->trans("SubledgerAccount");
|
||||
print '</td><td>';
|
||||
print $object->subledger_account;
|
||||
print '</td></tr>';
|
||||
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($object->fk_account > 0)
|
||||
|
||||
@ -82,7 +82,7 @@ if ($object->id)
|
||||
{
|
||||
$head=various_payment_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'documents', $langs->trans("VariousPayment"), -1, 'payment');
|
||||
dol_fiche_head($head, 'documents', $langs->trans("VariousPayment"), -1, 'payment');
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Project
|
||||
|
||||
@ -106,7 +106,7 @@ if ($year) $param.='&year='.$year;
|
||||
|
||||
if ($mode != 'sconly')
|
||||
{
|
||||
print $langs->trans("DescTaxAndDividendsArea").'<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescTaxAndDividendsArea").'</span><br>';
|
||||
print "<br>";
|
||||
}
|
||||
|
||||
@ -463,7 +463,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||
|
||||
print "<br>";
|
||||
|
||||
print load_fiche_titre( $langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
|
||||
print load_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
|
||||
|
||||
$sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, s.fk_bank, u.salary as current_salary,";
|
||||
$sql.= " pct.code as payment_code,";
|
||||
|
||||
@ -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.'/fourn/class/fournisseur.facture.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';
|
||||
|
||||
$langs->loadLangs(array("accountancy","bills"));
|
||||
@ -59,7 +60,7 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $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";
|
||||
|
||||
|
||||
@ -69,7 +70,7 @@ $arrayfields=array(
|
||||
);
|
||||
|
||||
// Security check
|
||||
if (empty($conf->compta->enabled) && empty($conf->accounting->enabled)) {
|
||||
if (empty($conf->comptabilite->enabled) && empty($conf->accounting->enabled)) {
|
||||
accessforbidden();
|
||||
}
|
||||
if ($user->societe_id > 0)
|
||||
@ -81,31 +82,47 @@ if ($user->societe_id > 0)
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$entity = GETPOST('entity', 'int')?GETPOST('entity', 'int'):$conf->entity;
|
||||
|
||||
//$parameters = array('socid' => $id);
|
||||
//$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');
|
||||
|
||||
$filesarray=array();
|
||||
$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)."'";
|
||||
$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.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" AND fk_statut <> ".Facture::STATUS_DRAFT;
|
||||
$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.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" AND fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
|
||||
$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.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" AND fk_statut <> ".ExpenseReport::STATUS_DRAFT;
|
||||
$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.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" AND fk_statut <> ".Don::STATUS_DRAFT;
|
||||
$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.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
|
||||
$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.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
$resd = $db->query($sql);
|
||||
$files=array();
|
||||
$link='';
|
||||
@ -120,7 +137,7 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
||||
|
||||
$upload_dir ='';
|
||||
$i=0;
|
||||
while($i<$numd)
|
||||
while ($i < $numd)
|
||||
{
|
||||
$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;
|
||||
$link="document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||
break;
|
||||
case "InvoiceSupplier":
|
||||
case "SupplierInvoice":
|
||||
$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;
|
||||
$link="document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||
break;
|
||||
case "Expense":
|
||||
case "ExpenseReport":
|
||||
$subdir=dol_sanitizeFileName($objd->ref);
|
||||
$upload_dir = $conf->expensereport->dir_output.'/'.$subdir;
|
||||
$link="document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||
break;
|
||||
case "Salary":
|
||||
case "SalaryPayment":
|
||||
$subdir=dol_sanitizeFileName($objd->id);
|
||||
$upload_dir = $conf->salaries->dir_output.'/'.$subdir;
|
||||
$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;
|
||||
$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['paid']=$objd->paid;
|
||||
$nofile['amount']=$objd->total_ttc;
|
||||
@ -212,15 +231,19 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
||||
*/
|
||||
//FIXME
|
||||
/*
|
||||
*ZIP creation
|
||||
*/
|
||||
*ZIP creation
|
||||
*/
|
||||
|
||||
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";
|
||||
$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;
|
||||
$res = $zip->open($zipname, ZipArchive::OVERWRITE|ZipArchive::CREATE);
|
||||
@ -228,8 +251,8 @@ if ($result && $action == "dl")
|
||||
{
|
||||
foreach ($filesarray as $key=> $file)
|
||||
{
|
||||
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";
|
||||
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); //
|
||||
$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->close();
|
||||
@ -251,21 +274,63 @@ if ($result && $action == "dl")
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
$title=$langs->trans("ComptaFiles").' - '.$langs->trans("List");
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"].$varlink;
|
||||
$head[$h][1] = $langs->trans("AccountantFiles");
|
||||
$head[$h][2] = 'AccountantFiles';
|
||||
$head[$h][1] = $langs->trans("AccountancyFiles");
|
||||
$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 $langs->trans("ReportPeriod").': '.$form->select_date($date_start, 'date_start', 0, 0, 0, "", 1, 1, 1);
|
||||
print ' - '.$form->select_date($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 1)."\n</a>";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
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";
|
||||
|
||||
dol_fiche_end();
|
||||
@ -281,6 +346,7 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
$param.='&date_stopyear='.GETPOST('date_stopyear', 'int');
|
||||
|
||||
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');
|
||||
|
||||
@ -315,17 +381,21 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
if ($result)
|
||||
{
|
||||
$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>';
|
||||
} else {
|
||||
// Sort array by date ASC to calucalte balance
|
||||
}
|
||||
else
|
||||
{
|
||||
// Sort array by date ASC to calculate balance
|
||||
|
||||
$totalDebit = 0;
|
||||
$totalCredit = 0;
|
||||
// Balance calculation
|
||||
$balance = 0;
|
||||
foreach($TData as &$data1) {
|
||||
if($data1['item']!='Invoice'&& $data1['item']!='Donation' ){
|
||||
if ($data1['item']!='Invoice'&& $data1['item']!='Donation' ){
|
||||
$data1['amount']=-$data1['amount'];
|
||||
}
|
||||
if ($data1['amount']>0){
|
||||
@ -334,8 +404,10 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
$balance += $data1['amount'];
|
||||
$data1['balance'] = $balance;
|
||||
}
|
||||
|
||||
// Display array
|
||||
foreach($TData as $data) {
|
||||
foreach($TData as $data)
|
||||
{
|
||||
$html_class = '';
|
||||
//if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture'];
|
||||
//elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement'];
|
||||
@ -343,7 +415,7 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
print "<td align=\"center\">";
|
||||
print dol_print_date($data['date'], 'day');
|
||||
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>';
|
||||
|
||||
// File link
|
||||
@ -358,6 +430,7 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
print '<td align="right">'.price($data['balance'])."</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="5"> </td>';
|
||||
print '<td align="right">'.price($totalDebit).'</td>';
|
||||
@ -370,6 +443,5 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -88,7 +88,7 @@ if ($object->id)
|
||||
|
||||
$head=trip_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip');
|
||||
dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip');
|
||||
|
||||
|
||||
// Build file list
|
||||
|
||||
@ -1449,7 +1449,7 @@ if (empty($reshook))
|
||||
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty);
|
||||
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty);
|
||||
|
||||
$result = $object->addline(
|
||||
$result = $object->addline(
|
||||
$desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $localtax1_tx, $localtax2_tx, $lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except,
|
||||
'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid,
|
||||
@ -2118,7 +2118,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'),
|
||||
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'),
|
||||
$date_start, $date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $type,
|
||||
GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('progress'),
|
||||
$_POST['units'], $pu_ht_devise);
|
||||
@ -2352,7 +2352,7 @@ if (empty($reshook))
|
||||
{
|
||||
$lineId = intval($lineId);
|
||||
$originLine = new $lineClassName($db);
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
|
||||
{
|
||||
$originLine->fetch_optionals($lineId);
|
||||
$desc = $originLine->desc;
|
||||
|
||||
@ -55,12 +55,13 @@ class Invoices extends DolibarrApi
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
function get($id)
|
||||
function get($id, $contact_list = 1)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->facture->lire) {
|
||||
throw new RestException(401);
|
||||
@ -82,7 +83,7 @@ class Invoices extends DolibarrApi
|
||||
}
|
||||
|
||||
// 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();
|
||||
return $this->_cleanObjectDatas($this->invoice);
|
||||
@ -337,7 +338,7 @@ class Invoices extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
$request_data = (object) $request_data;
|
||||
$updateRes = $this->invoice->updateline(
|
||||
$updateRes = $this->invoice->updateline(
|
||||
$lineid,
|
||||
$request_data->desc,
|
||||
$request_data->subprice,
|
||||
@ -361,7 +362,7 @@ class Invoices extends DolibarrApi
|
||||
$request_data->situation_percent,
|
||||
$request_data->fk_unit,
|
||||
$request_data->multicurrency_subprice
|
||||
);
|
||||
);
|
||||
|
||||
if ($updateRes > 0) {
|
||||
$result = $this->get($id);
|
||||
@ -371,6 +372,86 @@ class Invoices extends DolibarrApi
|
||||
throw new RestException(304, $this->invoice->error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
@ -225,7 +225,7 @@ class FactureRec extends CommonInvoice
|
||||
$tva_tx = $facsrc->lines[$i]->tva_tx;
|
||||
if (! empty($facsrc->lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$facsrc->lines[$i]->vat_src_code.')';
|
||||
|
||||
$result_insert = $this->addline(
|
||||
$result_insert = $this->addline(
|
||||
$facsrc->lines[$i]->desc,
|
||||
$facsrc->lines[$i]->subprice,
|
||||
$facsrc->lines[$i]->qty,
|
||||
@ -960,7 +960,7 @@ class FactureRec extends CommonInvoice
|
||||
/**
|
||||
* Return the next date of
|
||||
*
|
||||
* @return timestamp false if KO, timestamp if OK
|
||||
* @return int|false false if KO, timestamp if OK
|
||||
*/
|
||||
function getNextDate()
|
||||
{
|
||||
@ -1858,7 +1858,7 @@ class FactureLigneRec extends CommonInvoiceLine
|
||||
}
|
||||
$sql.= ", rang=".$this->rang;
|
||||
$sql.= ", special_code=".$this->special_code;
|
||||
$sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit )."'":"null");
|
||||
$sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit)."'":"null");
|
||||
$sql.= ", fk_contract_line=".($this->fk_contract_line?$this->fk_contract_line:"null");
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
|
||||
@ -675,7 +675,7 @@ class Facture extends CommonInvoice
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
@ -749,7 +749,7 @@ class Facture extends CommonInvoice
|
||||
$localtax1_tx = $_facrec->lines[$i]->localtax1_tx;
|
||||
$localtax2_tx = $_facrec->lines[$i]->localtax2_tx;
|
||||
|
||||
$result_insert = $this->addline(
|
||||
$result_insert = $this->addline(
|
||||
$_facrec->lines[$i]->desc,
|
||||
$_facrec->lines[$i]->subprice,
|
||||
$_facrec->lines[$i]->qty,
|
||||
|
||||
@ -855,7 +855,7 @@ if (empty($reshook))
|
||||
// Update line
|
||||
if (! $error)
|
||||
{
|
||||
$result = $object->updateline(
|
||||
$result = $object->updateline(
|
||||
GETPOST('lineid'),
|
||||
$description,
|
||||
$pu_ht,
|
||||
@ -1171,7 +1171,7 @@ if ($action == 'create')
|
||||
|
||||
if ($flag_price_may_change)
|
||||
{
|
||||
print '<tr><td colspan="3" align="left">';
|
||||
print '<tr><td colspan="3" class="left">';
|
||||
print '<select name="usenewprice" class="flat">';
|
||||
print '<option value="0">'.$langs->trans("AlwaysUseFixedPrice").'</option>';
|
||||
print '<option value="1" disabled>'.$langs->trans("AlwaysUseNewPrice").'</option>';
|
||||
@ -1306,7 +1306,7 @@ else
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer)
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&facid=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&facid=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE)
|
||||
@ -1330,7 +1330,7 @@ else
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer)
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editmode')
|
||||
@ -1393,7 +1393,7 @@ else
|
||||
print $langs->trans('RIB');
|
||||
print '<td>';
|
||||
if (($action != 'editbankaccount') && $user->rights->facture->creer && ! empty($object->brouillon))
|
||||
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 '</td><td>';
|
||||
if ($action == 'editbankaccount')
|
||||
@ -1415,7 +1415,7 @@ else
|
||||
print $langs->trans('Model');
|
||||
print '<td>';
|
||||
if (($action != 'editmodelpdf') && $user->rights->facture->creer && ! empty($object->brouillon))
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmodelpdf&id='.$object->id.'">'.img_edit($langs->trans('SetModel'), 1).'</a></td>';
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmodelpdf&id='.$object->id.'">'.img_edit($langs->trans('SetModel'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editmodelpdf')
|
||||
@ -1464,7 +1464,7 @@ else
|
||||
print $langs->trans('Frequency');
|
||||
print '</td>';
|
||||
if ($action != 'editfrequency' && ! empty($object->brouillon) && $user->rights->facture->creer)
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editfrequency&facid=' . $object->id . '">' . img_edit($langs->trans('Edit'), 1) . '</a></td>';
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editfrequency&facid=' . $object->id . '">' . img_edit($langs->trans('Edit'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editfrequency')
|
||||
|
||||
@ -348,47 +348,47 @@ if ($resql)
|
||||
// Ref
|
||||
if (! empty($arrayfields['f.titre']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Thirpdarty
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left"><input class="flat" type="text" size="8" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>';
|
||||
print '<td class="liste_titre left"><input class="flat" type="text" size="8" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total']['checked']))
|
||||
{
|
||||
// Amount net
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.tva']['checked']))
|
||||
{
|
||||
// Amount Vat
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ttc']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.fk_cond_reglement']['checked']))
|
||||
{
|
||||
// Payment term
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print $form->select_conditions_paiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100');
|
||||
print "</td>";
|
||||
}
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
|
||||
{
|
||||
// Payment mode
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
@ -479,12 +479,12 @@ if ($resql)
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['f.titre']['checked'])) print_liste_field_titre($arrayfields['f.titre']['label'], $_SERVER['PHP_SELF'], "f.titre", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], "s.nom", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total']['checked'])) print_liste_field_titre($arrayfields['f.total']['label'], $_SERVER['PHP_SELF'], "f.total", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.tva']['checked'])) print_liste_field_titre($arrayfields['f.tva']['label'], $_SERVER['PHP_SELF'], "f.tva", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], "f.total_ttc", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total']['checked'])) print_liste_field_titre($arrayfields['f.total']['label'], $_SERVER['PHP_SELF'], "f.total", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.tva']['checked'])) print_liste_field_titre($arrayfields['f.tva']['label'], $_SERVER['PHP_SELF'], "f.tva", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_cond_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_cond_reglement']['label'], $_SERVER['PHP_SELF'], "f.fk_cond_reglement", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER['PHP_SELF'], "f.fk_mode_reglement", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['recurring']['checked'])) print_liste_field_titre($arrayfields['recurring']['label'], $_SERVER['PHP_SELF'], "recurring", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['recurring']['checked'])) print_liste_field_titre($arrayfields['recurring']['label'], $_SERVER['PHP_SELF'], "recurring", "", $param, 'class="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.frequency']['checked'])) print_liste_field_titre($arrayfields['f.frequency']['label'], $_SERVER['PHP_SELF'], "f.frequency", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.unit_frequency']['checked'])) print_liste_field_titre($arrayfields['f.unit_frequency']['label'], $_SERVER['PHP_SELF'], "f.unit_frequency", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.nb_gen_done']['checked'])) print_liste_field_titre($arrayfields['f.nb_gen_done']['label'], $_SERVER['PHP_SELF'], "f.nb_gen_done", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
@ -533,21 +533,21 @@ if ($resql)
|
||||
}
|
||||
if (! empty($arrayfields['f.total']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($objp->total).'</td>'."\n";
|
||||
print '<td class="right">'.price($objp->total).'</td>'."\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total';
|
||||
$totalarray['val']['f.total'] += $objp->total;
|
||||
}
|
||||
if (! empty($arrayfields['f.tva']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($objp->total_vat).'</td>'."\n";
|
||||
print '<td class="right">'.price($objp->total_vat).'</td>'."\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.tva';
|
||||
$totalarray['val']['f.tva'] += $objp->total_vat;
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ttc']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($objp->total_ttc).'</td>'."\n";
|
||||
print '<td class="right">'.price($objp->total_ttc).'</td>'."\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total_ttc';
|
||||
$totalarray['val']['f.total_ttc'] += $objp->total_ttc;
|
||||
@ -555,7 +555,7 @@ if ($resql)
|
||||
// Payment term
|
||||
if (! empty($arrayfields['f.fk_cond_reglement']['checked']))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $form->form_conditions_reglement('', $objp->fk_cond_reglement, 'none');
|
||||
print '</td>'."\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -563,7 +563,7 @@ if ($resql)
|
||||
// Payment mode
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $form->form_modes_reglement('', $objp->fk_mode_reglement, 'none');
|
||||
print '</td>'."\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -683,7 +683,7 @@ if ($resql)
|
||||
while ($i < $totalarray['nbfield'])
|
||||
{
|
||||
$i++;
|
||||
if (! empty($totalarray['pos'][$i])) print '<td align="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
if (! empty($totalarray['pos'][$i])) print '<td class="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
else
|
||||
{
|
||||
if ($i == 1)
|
||||
|
||||
@ -303,7 +303,7 @@ if ($massaction == 'withdrawrequest')
|
||||
$error++;
|
||||
setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings');
|
||||
}
|
||||
elseif (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){
|
||||
elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE'){
|
||||
$error++;
|
||||
setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors');
|
||||
}
|
||||
@ -779,46 +779,46 @@ if ($resql)
|
||||
if (! empty($arrayfields['f.total_ht']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_vat']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked']))
|
||||
{
|
||||
// Localtax1
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_localtax1" value="'.$search_montant_localtax1.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked']))
|
||||
{
|
||||
// Localtax2
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_localtax2" value="'.$search_montant_localtax2.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ttc']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['rtp']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
@ -843,7 +843,7 @@ if ($resql)
|
||||
// Status
|
||||
if (! empty($arrayfields['f.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="right">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||
$liststatus=array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '1,2'=>$langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled"));
|
||||
print $form->selectarray('search_status', $liststatus, $search_status, 1);
|
||||
print '</td>';
|
||||
@ -869,13 +869,13 @@ if ($resql)
|
||||
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['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
@ -884,7 +884,7 @@ if ($resql)
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut,f.paye,f.type,dynamount_payed", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut,f.paye,f.type,dynamount_payed", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -1084,7 +1084,7 @@ if ($resql)
|
||||
// Amount HT
|
||||
if (! empty($arrayfields['f.total_ht']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_ht)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_ht)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalht'] += $obj->total_ht;
|
||||
@ -1092,7 +1092,7 @@ if ($resql)
|
||||
// Amount VAT
|
||||
if (! empty($arrayfields['f.total_vat']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_vat)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_vat)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalvat'] += $obj->total_vat;
|
||||
@ -1100,7 +1100,7 @@ if ($resql)
|
||||
// Amount LocalTax1
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_localtax1)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_localtax1)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totallocaltax1field']=$totalarray['nbfield'];
|
||||
$totalarray['totallocaltax1'] += $obj->total_localtax1;
|
||||
@ -1108,7 +1108,7 @@ if ($resql)
|
||||
// Amount LocalTax2
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_localtax2)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_localtax2)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totallocaltax2field']=$totalarray['nbfield'];
|
||||
$totalarray['totallocaltax2'] += $obj->total_localtax2;
|
||||
@ -1116,7 +1116,7 @@ if ($resql)
|
||||
// Amount TTC
|
||||
if (! empty($arrayfields['f.total_ttc']['checked']))
|
||||
{
|
||||
print '<td align="right">'.price($obj->total_ttc)."</td>\n";
|
||||
print '<td class="right">'.price($obj->total_ttc)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalttc'] += $obj->total_ttc;
|
||||
@ -1124,7 +1124,7 @@ if ($resql)
|
||||
|
||||
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||
{
|
||||
print '<td align="right">'.(! empty($totalpay)?price($totalpay, 0, $langs):' ').'</td>'; // TODO Use a denormalized field
|
||||
print '<td class="right">'.(! empty($totalpay)?price($totalpay, 0, $langs):' ').'</td>'; // TODO Use a denormalized field
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalamfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalam'] += $totalpay;
|
||||
@ -1132,7 +1132,7 @@ if ($resql)
|
||||
|
||||
if (! empty($arrayfields['rtp']['checked']))
|
||||
{
|
||||
print '<td align="right">'.(! empty($remaintopay)?price($remaintopay, 0, $langs):' ').'</td>'; // TODO Use a denormalized field
|
||||
print '<td class="right">'.(! empty($remaintopay)?price($remaintopay, 0, $langs):' ').'</td>'; // TODO Use a denormalized field
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalrtpfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalrtp'] += $remaintopay;
|
||||
@ -1163,7 +1163,7 @@ if ($resql)
|
||||
// Status
|
||||
if (! empty($arrayfields['f.fk_statut']['checked']))
|
||||
{
|
||||
print '<td align="right" class="nowrap">';
|
||||
print '<td class="nowrap right">';
|
||||
print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $paiement, $obj->type);
|
||||
print "</td>";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -1205,13 +1205,13 @@ if ($resql)
|
||||
if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>';
|
||||
else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
elseif ($totalarray['totalhtfield'] == $i) print '<td align="right">'.price($totalarray['totalht']).'</td>';
|
||||
elseif ($totalarray['totalvatfield'] == $i) print '<td align="right">'.price($totalarray['totalvat']).'</td>';
|
||||
elseif ($totalarray['totallocaltax1field'] == $i) print '<td align="right">'.price($totalarray['totallocaltax1']).'</td>';
|
||||
elseif ($totalarray['totallocaltax2field'] == $i) print '<td align="right">'.price($totalarray['totallocaltax2']).'</td>';
|
||||
elseif ($totalarray['totalttcfield'] == $i) print '<td align="right">'.price($totalarray['totalttc']).'</td>';
|
||||
elseif ($totalarray['totalamfield'] == $i) print '<td align="right">'.price($totalarray['totalam']).'</td>';
|
||||
elseif ($totalarray['totalrtpfield'] == $i) print '<td align="right">'.price($totalarray['totalrtp']).'</td>';
|
||||
elseif ($totalarray['totalhtfield'] == $i) print '<td class="right">'.price($totalarray['totalht']).'</td>';
|
||||
elseif ($totalarray['totalvatfield'] == $i) print '<td class="right">'.price($totalarray['totalvat']).'</td>';
|
||||
elseif ($totalarray['totallocaltax1field'] == $i) print '<td class="right">'.price($totalarray['totallocaltax1']).'</td>';
|
||||
elseif ($totalarray['totallocaltax2field'] == $i) print '<td class="right">'.price($totalarray['totallocaltax2']).'</td>';
|
||||
elseif ($totalarray['totalttcfield'] == $i) print '<td class="right">'.price($totalarray['totalttc']).'</td>';
|
||||
elseif ($totalarray['totalamfield'] == $i) print '<td class="right">'.price($totalarray['totalam']).'</td>';
|
||||
elseif ($totalarray['totalrtpfield'] == $i) print '<td class="right">'.price($totalarray['totalrtp']).'</td>';
|
||||
else print '<td></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
@ -274,7 +274,7 @@ if ($object->id > 0)
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DateInvoice');
|
||||
print '</td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editinvoicedate&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editinvoicedate&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
|
||||
@ -301,7 +301,7 @@ if ($object->id > 0)
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE)
|
||||
@ -326,7 +326,7 @@ if ($object->id > 0)
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DateMaxPayment');
|
||||
print '</td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editpaymentterm&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editpaymentterm&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE)
|
||||
@ -354,7 +354,7 @@ if ($object->id > 0)
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>';
|
||||
if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer) 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 '</td><td colspan="3">';
|
||||
if ($action == 'editmode')
|
||||
@ -373,7 +373,7 @@ if ($object->id > 0)
|
||||
print $langs->trans('BankAccount');
|
||||
print '<td>';
|
||||
if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon))
|
||||
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 '</td><td colspan="3">';
|
||||
if ($action == 'editbankaccount')
|
||||
@ -447,7 +447,7 @@ if ($object->id > 0)
|
||||
print '</td>';
|
||||
if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer)
|
||||
{
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editrevenuestamp&facid=' . $object->id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . '</a></td>';
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editrevenuestamp&facid=' . $object->id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . '</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
@ -615,7 +615,7 @@ if ($object->id > 0)
|
||||
|
||||
print '<td align="center">'.$langs->trans("OrderWaiting").'</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&did='.$obj->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
|
||||
@ -182,7 +182,7 @@ print "<tr class=\"liste_titre\">";
|
||||
print "<td>".$langs->trans("Date")."</td>";
|
||||
print "<td>".$langs->trans("Piece").' ('.$langs->trans("InvoiceRef").")</td>";
|
||||
print "<td>".$langs->trans("Account")."</td>";
|
||||
print "<td>".$langs->trans("Type")."</td><td align='right'>".$langs->trans("Debit")."</td><td align='right'>".$langs->trans("Credit")."</td>";
|
||||
print "<td>".$langs->trans("Type")."</td><td class='right'>".$langs->trans("Debit")."</td><td class='right'>".$langs->trans("Credit")."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -236,13 +236,13 @@ foreach ($tabfac as $key => $val)
|
||||
|
||||
if (isset($line['inv']))
|
||||
{
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td class="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td class="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td class="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td class="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
|
||||
@ -211,7 +211,7 @@ print '<tr class="liste_titre">';
|
||||
//print "<td>".$langs->trans("JournalNum")."</td>";
|
||||
print '<td>'.$langs->trans('Date').'</td><td>'.$langs->trans('Piece').' ('.$langs->trans('InvoiceRef').')</td>';
|
||||
print '<td>'.$langs->trans('Account').'</td>';
|
||||
print '<td>'.$langs->trans('Type').'</td><td align="right">'.$langs->trans('Debit').'</td><td align="right">'.$langs->trans('Credit').'</td>';
|
||||
print '<td>'.$langs->trans('Type').'</td><td class="right">'.$langs->trans('Debit').'</td><td class="right">'.$langs->trans('Credit').'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -266,13 +266,13 @@ foreach ($tabfac as $key => $val)
|
||||
|
||||
if (isset($line['inv']))
|
||||
{
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td class="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td class="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td class="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td class="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
|
||||
@ -157,13 +157,13 @@ $vatsup=$langs->transcountry($local==1?"LT1":"LT2", $mysoc->country_code);
|
||||
// IRPF that the customer has retained me
|
||||
if($calc ==0 || $calc == 2)
|
||||
{
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td class="left">'.$langs->trans("Num")."</td>";
|
||||
print '<td class="left">'.$langs->trans("Customer")."</td>";
|
||||
print "<td>".$langs->transcountry("ProfId1", $mysoc->country_code)."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("TotalHT")."</td>";
|
||||
print "<td align=\"right\">".$vatcust."</td>";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="left">'.$langs->trans("Num").'</td>';
|
||||
print '<td class="left">'.$langs->trans("Customer").'</td>';
|
||||
print '<td>'.$langs->transcountry("ProfId1", $mysoc->country_code).'</td>';
|
||||
print '<td class="right">'.$langs->trans("TotalHT").'</td>';
|
||||
print '<td class="right">'.$vatcust.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$coll_list = tax_by_thirdparty('localtax'.$local, $db, 0, $date_start, $date_end, $modetax, 'sell');
|
||||
@ -208,9 +208,9 @@ if($calc ==0 || $calc == 2)
|
||||
print '<td class="nowrap">'.$company_static->getNomUrl(1).'</td>';
|
||||
$find = array(' ','.');
|
||||
$replace = array('','');
|
||||
print '<td class="nowrap">'.$intra."</td>";
|
||||
print "<td class=\"nowrap\" align=\"right\">".price($coll->amount)."</td>";
|
||||
print "<td class=\"nowrap\" align=\"right\">".price($local==1?$coll->localtax1:$coll->localtax2)."</td>";
|
||||
print '<td class="nowrap">'.$intra.'</td>';
|
||||
print '<td class="nowrap right">'.price($coll->amount).'</td>';
|
||||
print '<td class="nowrap right">'.price($local==1?$coll->localtax1:$coll->localtax2).'</td>';
|
||||
$totalamount = $totalamount + $coll->amount;
|
||||
$total = $total + ($local==1?$coll->localtax1:$coll->localtax2);
|
||||
print "</tr>\n";
|
||||
@ -219,9 +219,9 @@ if($calc ==0 || $calc == 2)
|
||||
}
|
||||
$x_coll_sum = $total;
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="nowrap" align="right">'.price($totalamount).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price($total).'</td>';
|
||||
print '<tr class="liste_total"><td class="right" colspan="3">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="nowrap right">'.price($totalamount).'</td>';
|
||||
print '<td class="nowrap right">'.price($total).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
@ -238,13 +238,13 @@ if($calc ==0 || $calc == 2)
|
||||
|
||||
// IRPF I retained my supplier
|
||||
if($calc ==0 || $calc == 1){
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="left">'.$langs->trans("Num")."</td>";
|
||||
print '<td class="left">'.$langs->trans("Supplier")."</td>";
|
||||
print "<td>".$langs->transcountry("ProfId1", $mysoc->country_code)."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("TotalHT")."</td>";
|
||||
print "<td align=\"right\">".$vatsup."</td>";
|
||||
print '<td>'.$langs->transcountry("ProfId1", $mysoc->country_code).'</td>';
|
||||
print '<td class="right">'.$langs->trans("TotalHT").'</td>';
|
||||
print '<td class="right">'.$vatsup.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$company_static=new Societe($db);
|
||||
@ -283,8 +283,8 @@ if($calc ==0 || $calc == 1){
|
||||
$find = array(' ','.');
|
||||
$replace = array('','');
|
||||
print '<td class="nowrap">'.$intra."</td>";
|
||||
print "<td class=\"nowrap\" align=\"right\">".price($coll->amount)."</td>";
|
||||
print "<td class=\"nowrap\" align=\"right\">".price($local==1?$coll->localtax1:$coll->localtax2)."</td>";
|
||||
print '<td class="nowrap right">'.price($coll->amount).'</td>';
|
||||
print '<td class="nowrap right">'.price($local==1?$coll->localtax1:$coll->localtax2).'</td>';
|
||||
$totalamount = $totalamount + $coll->amount;
|
||||
$total = $total + ($local==1?$coll->localtax1:$coll->localtax2);
|
||||
print "</tr>\n";
|
||||
@ -293,9 +293,9 @@ if($calc ==0 || $calc == 1){
|
||||
}
|
||||
$x_paye_sum = $total;
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="nowrap" align="right">'.price($totalamount).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price($total).'</td>';
|
||||
print '<tr class="liste_total"><td class="right" colspan="3">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="nowrap right">'.price($totalamount).'</td>';
|
||||
print '<td class="nowrap right">'.price($total).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -319,7 +319,7 @@ if($calc ==0){
|
||||
$diff = $x_coll_sum - $x_paye_sum ;
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total" colspan="4">'.$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 '</table>';
|
||||
|
||||
@ -101,8 +101,8 @@ function pt($db, $sql, $date)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="nowrap">'.$date.'</td>';
|
||||
print '<td align="right">'.$langs->trans("ClaimedForThisPeriod").'</td>';
|
||||
print '<td align="right">'.$langs->trans("PaidDuringThisPeriod").'</td>';
|
||||
print '<td class="right">'.$langs->trans("ClaimedForThisPeriod").'</td>';
|
||||
print '<td class="right">'.$langs->trans("PaidDuringThisPeriod").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$totalclaimed = 0;
|
||||
@ -122,8 +122,8 @@ function pt($db, $sql, $date)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
||||
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountpaid)."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$amountclaimed = 0;
|
||||
@ -145,8 +145,8 @@ function pt($db, $sql, $date)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$obj->dm."</td>\n";
|
||||
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountpaid)."</td>\n";
|
||||
print "</tr>\n";
|
||||
$amountclaimed = 0;
|
||||
$amountpaid = 0;
|
||||
@ -166,8 +166,8 @@ function pt($db, $sql, $date)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
||||
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap right">'.price($amountpaid)."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$amountclaimed = 0;
|
||||
@ -175,9 +175,9 @@ function pt($db, $sql, $date)
|
||||
}
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td align="right">'.$langs->trans("Total").'</td>';
|
||||
print '<td class="nowrap" align="right">'.price($totalclaimed).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price($totalpaid).'</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").'</td>';
|
||||
print '<td class="nowrap right">'.price($totalclaimed).'</td>';
|
||||
print '<td class="nowrap right">'.price($totalpaid).'</td>';
|
||||
print "</tr>";
|
||||
|
||||
print "</table>";
|
||||
@ -249,16 +249,16 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="30%">'.$langs->trans("Year")." ".$y."</td>";
|
||||
if($CalcLT==0) {
|
||||
print "<td align=\"right\">".$langs->transcountry($LTCustomer, $mysoc->country_code)."</td>";
|
||||
print "<td align=\"right\">".$langs->transcountry($LTSupplier, $mysoc->country_code)."</td>";
|
||||
print '<td class="right">'.$langs->transcountry($LTCustomer, $mysoc->country_code).'</td>';
|
||||
print '<td class="right">'.$langs->transcountry($LTSupplier, $mysoc->country_code).'</td>';
|
||||
}
|
||||
if($CalcLT==1) {
|
||||
print "<td align=\"right\">".$langs->transcountry($LTSupplier, $mysoc->country_code)."</td><td></td>";
|
||||
print '<td class="right">'.$langs->transcountry($LTSupplier, $mysoc->country_code).'</td><td></td>';
|
||||
}
|
||||
if($CalcLT==2) {
|
||||
print "<td align=\"right\">".$langs->transcountry($LTCustomer, $mysoc->country_code)."</td><td></td>";
|
||||
print '<td class="right">'.$langs->transcountry($LTCustomer, $mysoc->country_code).'</td><td></td>';
|
||||
}
|
||||
print "<td align=\"right\">".$langs->trans("TotalToPay")."</td>";
|
||||
print '<td class="right">'.$langs->trans("TotalToPay").'</td>';
|
||||
print "<td> </td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -475,7 +475,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
||||
$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;
|
||||
foreach (array_keys($x_paye) as $rate)
|
||||
@ -519,7 +519,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
||||
$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;
|
||||
$subtotalpaye = $subtotalpaye + $x_paye_sum;
|
||||
@ -528,7 +528,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
||||
$total = $total + $diff;
|
||||
$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 "</tr>\n";
|
||||
|
||||
@ -536,16 +536,16 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
||||
if ($i > 2)
|
||||
{
|
||||
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="nowrap" align="right">'.price(price2num($subtotalcoll, 'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalpaye, 'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtotal, 'MT')).'</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 right">'.price(price2num($subtotalcoll, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num($subtotalpaye, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num($subtotal, 'MT')).'</td>';
|
||||
print '<td> </td></tr>';
|
||||
$i = 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 '</tr>';
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ if ($result)
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td colspan="4">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total).'</td></tr>';
|
||||
print '<td class="right">'.price($total).'</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
$db->free($result);
|
||||
|
||||
@ -320,10 +320,10 @@ else
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="left">'.$elementcust.'</td>';
|
||||
print '<td class="left">'.$productcust.'</td>';
|
||||
if ($modetax != 2) print '<td align="right">'.$amountcust.'</td>';
|
||||
if ($modetax != 1) print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||
print '<td align="right">'.$langs->trans("BI").'</td>';
|
||||
print '<td align="right">'.$vatcust.'</td>';
|
||||
if ($modetax != 2) print '<td class="right">'.$amountcust.'</td>';
|
||||
if ($modetax != 1) print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||
print '<td class="right">'.$langs->trans("BI").'</td>';
|
||||
print '<td class="right">'.$vatcust.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -357,7 +357,7 @@ else
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
||||
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||
|
||||
// Description
|
||||
print '<td class="left">';
|
||||
@ -389,7 +389,7 @@ else
|
||||
// Total HT
|
||||
if ($modetax != 2)
|
||||
{
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
print price($fields['totalht']);
|
||||
if (price2num($fields['ftotal_ttc']))
|
||||
{
|
||||
@ -403,7 +403,7 @@ else
|
||||
if ($modetax != 1)
|
||||
{
|
||||
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||
{
|
||||
$payment_static->id=$fields['payment_id'];
|
||||
@ -421,14 +421,14 @@ else
|
||||
}
|
||||
|
||||
// Total collected
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
$temp_ht=$fields['totalht'];
|
||||
if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||
print price(price2num($temp_ht, 'MT'));
|
||||
print '</td>';
|
||||
|
||||
// Localtax
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
$temp_vat= $local==1?$fields['localtax1']:$fields['localtax2'];
|
||||
print price(price2num($temp_vat, 'MT'));
|
||||
//print price($fields['vat']);
|
||||
@ -445,14 +445,14 @@ else
|
||||
// Total customers for this vat rate
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td class="nowrap" align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td class="nowrap right"> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
}
|
||||
print '<td align="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="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -460,14 +460,14 @@ else
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax == 0)
|
||||
{
|
||||
print '<td class="nowrap" align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td class="nowrap right"> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -485,11 +485,11 @@ else
|
||||
print '<td class="left">'.$productsup.'</td>';
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td align="right">'.$amountsup.'</td>';
|
||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||
print '<td class="right">'.$amountsup.'</td>';
|
||||
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||
}
|
||||
print '<td align="right">'.$langs->trans("BI").'</td>';
|
||||
print '<td align="right">'.$vatsup.'</td>';
|
||||
print '<td class="right">'.$langs->trans("BI").'</td>';
|
||||
print '<td class="right">'.$vatsup.'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
foreach(array_keys($x_paye) as $rate)
|
||||
@ -519,7 +519,7 @@ else
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
||||
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||
|
||||
// Description
|
||||
print '<td class="left">';
|
||||
@ -545,7 +545,7 @@ else
|
||||
// Total HT
|
||||
if ($modetax != 2)
|
||||
{
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
print price($fields['totalht']);
|
||||
if (price2num($fields['ftotal_ttc']))
|
||||
{
|
||||
@ -560,7 +560,7 @@ else
|
||||
$ratiopaymentinvoice=1;
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
|
||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||
{
|
||||
@ -582,13 +582,13 @@ else
|
||||
}
|
||||
|
||||
// VAT paid
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||
print price(price2num($temp_ht, 'MT'), 1);
|
||||
print '</td>';
|
||||
|
||||
// Localtax
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
$temp_vat=($local==1?$fields['localtax1']:$fields['localtax2'])*$ratiopaymentinvoice;
|
||||
print price(price2num($temp_vat, 'MT'), 1);
|
||||
//print price($fields['vat']);
|
||||
@ -605,27 +605,27 @@ else
|
||||
// Total suppliers for this vat rate
|
||||
print '<tr class="liste_total">';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td class="nowrap" align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td class="nowrap right"> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
}
|
||||
print '<td align="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="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
||||
print '<tr class="liste_total">';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax != 1) {
|
||||
print '<td class="nowrap" align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td class="nowrap right"> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ else
|
||||
$diff = $x_coll_sum - $x_paye_sum;
|
||||
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 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";
|
||||
|
||||
$i++;
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -763,7 +763,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
{
|
||||
// Print total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="2" align="left">'.$langs->trans('TotalTTC').'</td>';
|
||||
print '<td colspan="3" align="left">'.$langs->trans('TotalTTC').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
|
||||
@ -343,10 +343,10 @@ if ($resql)
|
||||
print '<td>'.$langs->trans('Bill').'</td>';
|
||||
print '<td>'.$langs->trans('Company').'</td>';
|
||||
if($conf->global->MULTICOMPANY_INVOICE_SHARING_ENABLED )print '<td>'.$langs->trans('Entity').'</td>';
|
||||
print '<td align="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||
print '<td align="right">'.$langs->trans('RemainderToPay').'</td>';
|
||||
print '<td align="right">'.$langs->trans('Status').'</td>';
|
||||
print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||
print '<td class="right">'.$langs->trans('RemainderToPay').'</td>';
|
||||
print '<td class="right">'.$langs->trans('Status').'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if ($num > 0)
|
||||
@ -386,16 +386,16 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
// Expected to pay
|
||||
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
||||
print '<td class="right">'.price($objp->total_ttc).'</td>';
|
||||
|
||||
// Amount payed
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
|
||||
// Remain to pay
|
||||
print '<td align="right">'.price($remaintopay).'</td>';
|
||||
print '<td class="right">'.price($remaintopay).'</td>';
|
||||
|
||||
// Status
|
||||
print '<td align="right">'.$invoice->getLibStatut(5, $alreadypayed).'</td>';
|
||||
print '<td class="right">'.$invoice->getLibStatut(5, $alreadypayed).'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
if ($objp->paye == 1) // If at least one invoice is paid, disable delete
|
||||
|
||||
@ -476,7 +476,7 @@ if ($action == 'new')
|
||||
print '<td style="min-width: 120px">'.$langs->trans("ChequeNumber")."</td>\n";
|
||||
print '<td style="min-width: 200px">'.$langs->trans("CheckTransmitter")."</td>\n";
|
||||
print '<td style="min-width: 200px">'.$langs->trans("Bank")."</td>\n";
|
||||
print '<td align="right" width="100px">'.$langs->trans("Amount")."</td>\n";
|
||||
print '<td class="right" width="100px">'.$langs->trans("Amount")."</td>\n";
|
||||
print '<td align="center" width="100px">'.$langs->trans("Payment")."</td>\n";
|
||||
print '<td align="center" width="100px">'.$langs->trans("LineRecord")."</td>\n";
|
||||
print '<td align="center" width="100px">'.$langs->trans("Select")."<br>";
|
||||
@ -500,7 +500,7 @@ if ($action == 'new')
|
||||
print '<td>'.$value["numero"]."</td>\n";
|
||||
print '<td>'.$value["emetteur"]."</td>\n";
|
||||
print '<td>'.$value["banque"]."</td>\n";
|
||||
print '<td align="right">'.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).'</td>';
|
||||
print '<td class="right">'.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).'</td>';
|
||||
|
||||
// Link to payment
|
||||
print '<td align="center">';
|
||||
@ -576,7 +576,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Date');
|
||||
print '</td>';
|
||||
if ($action != 'editdate') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||
if ($action != 'editdate') print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'editdate')
|
||||
@ -603,7 +603,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('RefExt');
|
||||
print '</td>';
|
||||
if ($action != 'editrefext') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editrefext&id='.$object->id.'">'.img_edit($langs->trans('SetRefExt'),1).'</a></td>';
|
||||
if ($action != 'editrefext') print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editrefext&id='.$object->id.'">'.img_edit($langs->trans('SetRefExt'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'editrefext')
|
||||
@ -674,7 +674,7 @@ else
|
||||
print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "b.num_chq", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("CheckTransmitter", $_SERVER["PHP_SELF"], "b.emetteur", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Bank", $_SERVER["PHP_SELF"], "b.banque", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "b.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "b.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Payment", $_SERVER["PHP_SELF"], "p.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("LineRecord", $_SERVER["PHP_SELF"], "b.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('');
|
||||
@ -698,7 +698,7 @@ else
|
||||
print '<td align="center">'.($objp->num_chq?$objp->num_chq:' ').'</td>';
|
||||
print '<td>'.dol_trunc($objp->emetteur, 24).'</td>';
|
||||
print '<td>'.dol_trunc($objp->banque, 24).'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
// Link to payment
|
||||
print '<td align="center">';
|
||||
$paymentstatic->id=$objp->pid;
|
||||
@ -725,7 +725,7 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
// Action button
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($object->statut == 0)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&lineid='.$objp->rowid.'">'.img_delete().'</a>';
|
||||
|
||||
@ -72,7 +72,7 @@ if ($resql) {
|
||||
}
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("BankChecksToReceipt").'</td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?leftmenu=customers_bills_checks&action=new">'.$num.'</a>';
|
||||
print '</td></tr>';
|
||||
print "</table>\n";
|
||||
@ -106,9 +106,9 @@ if ($resql)
|
||||
print '<th>'.$langs->trans("LastCheckReceiptShort", $max).'</th>';
|
||||
print '<th>'.$langs->trans("Date")."</th>";
|
||||
print '<th>'.$langs->trans("Account").'</th>';
|
||||
print '<th align="right">'.$langs->trans("NbOfCheques").'</th>';
|
||||
print '<th align="right">'.$langs->trans("Amount").'</th>';
|
||||
print '<th align="right">'.$langs->trans("Status").'</th>';
|
||||
print '<th class="right">'.$langs->trans("NbOfCheques").'</th>';
|
||||
print '<th class="right">'.$langs->trans("Amount").'</th>';
|
||||
print '<th class="right">'.$langs->trans("Status").'</th>';
|
||||
print "</tr>\n";
|
||||
|
||||
while ( $objp = $db->fetch_object($resql) )
|
||||
@ -131,9 +131,9 @@ if ($resql)
|
||||
print '<td>'.$checkdepositstatic->getNomUrl(1).'</td>';
|
||||
print '<td>'.dol_print_date($db->jdate($objp->db), 'day').'</td>';
|
||||
print '<td>'.$accountstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="right">'.$objp->nbcheque.'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td align="right">'.$checkdepositstatic->LibStatut($objp->statut, 3).'</td>';
|
||||
print '<td class="right">'.$objp->nbcheque.'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.$checkdepositstatic->LibStatut($objp->statut, 3).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -173,11 +173,11 @@ if ($resql)
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_amount" value="'.$search_amount.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -187,9 +187,9 @@ if ($resql)
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "bc.ref", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "dp", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("NbOfCheques", $_SERVER["PHP_SELF"], "bc.nbcheque", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "bc.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "bc.statut", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("NbOfCheques", $_SERVER["PHP_SELF"], "bc.nbcheque", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "bc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "bc.statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -219,13 +219,13 @@ if ($resql)
|
||||
print '</td>';
|
||||
|
||||
// Number of cheques
|
||||
print '<td align="right">'.$objp->nbcheque.'</td>';
|
||||
print '<td class="right">'.$objp->nbcheque.'</td>';
|
||||
|
||||
// Amount
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
|
||||
// Statut
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $checkdepositstatic->LibStatut($objp->statut, 5);
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -725,7 +725,7 @@ class Paiement extends CommonObject
|
||||
// Add link 'WithdrawalPayment' in bank_url
|
||||
if (! $error && $label == '(WithdrawalPayment)')
|
||||
{
|
||||
$result=$acc->add_url_line(
|
||||
$result=$acc->add_url_line(
|
||||
$bank_line_id,
|
||||
$this->id_prelevement,
|
||||
DOL_URL_ROOT.'/compta/prelevement/card.php?id=',
|
||||
|
||||
@ -225,7 +225,7 @@ if ($resql)
|
||||
|
||||
// Lines for filters fields
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
@ -248,16 +248,16 @@ if ($resql)
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
@ -272,14 +272,14 @@ if ($resql)
|
||||
{
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||
}
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
//print_liste_field_titre("Invoices"),"","","",$param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
//print_liste_field_titre("Invoices"),"","","",$param,'class="left"',$sortfield,$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
|
||||
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 "</tr>\n";
|
||||
|
||||
@ -342,11 +342,11 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
// Amount
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($objp->statut == 0) print '<a href="card.php?id='.$objp->rowid.'&action=valide">';
|
||||
print $paymentstatic->LibStatut($objp->statut, 5);
|
||||
if ($objp->statut == 0) print '</a>';
|
||||
|
||||
@ -142,8 +142,8 @@ if ($year)
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Reporting").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Date").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Date").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if (is_resource($handle))
|
||||
@ -156,8 +156,8 @@ if ($year)
|
||||
$tfile = $dir . '/'.$year.'/'.$file;
|
||||
$relativepath = $year.'/'.$file;
|
||||
print '<tr class="oddeven">'.'<td><a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart=facture_paiement&file='.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a></td>';
|
||||
print '<td align="right">'.dol_print_size(dol_filesize($tfile)).'</td>';
|
||||
print '<td align="right">'.dol_print_date(dol_filemtime($tfile), "dayhour").'</td></tr>';
|
||||
print '<td class="right">'.dol_print_size(dol_filesize($tfile)).'</td>';
|
||||
print '<td class="right">'.dol_print_date(dol_filemtime($tfile), "dayhour").'</td></tr>';
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
@ -108,7 +108,7 @@ if ($resql)
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.rowid", "", "", 'width="60"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "dp", "", "", 'width="80" align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "c.libelle", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "c.libelle", "", "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "c.libelle", "", "", 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -120,7 +120,7 @@ if ($resql)
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"), "payment").' '.$objp->rowid.'</a></td>';
|
||||
print '<td width="80" align="center">'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||
print "<td>$objp->paiement_type $objp->num_paiement</td>\n";
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
print '<td align="center">';
|
||||
|
||||
if ($objp->statut == 0)
|
||||
|
||||
@ -240,9 +240,9 @@ if ($resql)
|
||||
print '<td>'.$langs->trans('SocialContribution').'</td>';
|
||||
print '<td>'.$langs->trans('Type').'</td>';
|
||||
print '<td>'.$langs->trans('Label').'</td>';
|
||||
print '<td align="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
|
||||
print '<td align="center">'.$langs->trans('Status').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||
print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if ($num > 0)
|
||||
@ -265,11 +265,11 @@ if ($resql)
|
||||
// Label
|
||||
print '<td>'.$objp->libelle.'</td>';
|
||||
// Expected to pay
|
||||
print '<td align="right">'.price($objp->sc_amount).'</td>';
|
||||
print '<td class="right">'.price($objp->sc_amount).'</td>';
|
||||
// Status
|
||||
print '<td align="center">'.$socialcontrib->getLibStatut(4, $objp->amount).'</td>';
|
||||
// Amount payed
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
print "</tr>\n";
|
||||
if ($objp->paye == 1) // If at least one invoice is paid, disable delete
|
||||
{
|
||||
|
||||
@ -136,7 +136,7 @@ if ($result)
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat maxwidth100" name="search_amount" value="'. dol_escape_htmltag($search_amount).'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -145,8 +145,8 @@ if ($result)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref", '', '', 'class="liste_titre"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", "", 'class="liste_titre" align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", "", 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'class="right"', $sortfield, $sortorder);
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -160,13 +160,13 @@ if ($result)
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->amount)."</td>\n";
|
||||
print '<td class="right">'.price($obj->amount)."</td>\n";
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $bon->LibStatut($obj->statut, 3);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right"></td>'."\n";
|
||||
print '<td class="right"></td>'."\n";
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@ -344,7 +344,7 @@ if ($id > 0 || $ref)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Lines", $_SERVER["PHP_SELF"], "pl.rowid", '', $urladd);
|
||||
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $urladd, 'align="right"');
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $urladd, 'class="right"');
|
||||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -372,7 +372,7 @@ if ($id > 0 || $ref)
|
||||
print $thirdparty->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->amount)."</td>\n";
|
||||
print '<td class="right">'.price($obj->amount)."</td>\n";
|
||||
|
||||
print '<td>';
|
||||
|
||||
@ -397,7 +397,7 @@ if ($id > 0 || $ref)
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($total != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices");
|
||||
print price($total);
|
||||
print "</td>\n";
|
||||
|
||||
@ -234,8 +234,8 @@ if ($resql)
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
print '<td>'.$langs->trans("RIB").'</td>';
|
||||
print '<td>'.$langs->trans("RUM").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateRequest").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td class="right">'.$langs->trans("DateRequest").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if ($num)
|
||||
@ -271,11 +271,11 @@ if ($resql)
|
||||
if ($format) print ' ('.$format.')';
|
||||
print '</td>';
|
||||
// Amount
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print price($obj->amount, 0, $langs, 0, 0, -1, $conf->currency);
|
||||
print '</td>';
|
||||
// Date
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print dol_print_date($db->jdate($obj->date_demande), 'day');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -317,7 +317,7 @@ if ($result)
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Ref").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Date").'</td><td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Date").'</td><td class="right">'.$langs->trans("Amount").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
@ -335,7 +335,7 @@ if ($result)
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datec),'day')."</td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->amount,0,$langs,0,0,-1,$conf->currency)."</td>\n";
|
||||
print '<td class="right">'.price($obj->amount,0,$langs,0,0,-1,$conf->currency)."</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user